Skip to content

Commit ffd95be

Browse files
authored
Merge pull request visualpython#164 from visualpython/release
Release v2.2.12
2 parents a49fa9d + 488878c commit ffd95be

File tree

4 files changed

+19
-6
lines changed

4 files changed

+19
-6
lines changed

js/com/com_Config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ define([
587587
/**
588588
* Version
589589
*/
590-
Config.version = "2.2.11";
590+
Config.version = "2.2.12";
591591

592592
/**
593593
* Type of mode

js/com/com_Const.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ define ([
1919
class Constants { }
2020

2121
Constants.TOOLBAR_BTN_INFO = {
22-
HELP: "Visual Python 2.2.11"
22+
HELP: "Visual Python 2.2.12"
2323
, ICON: "vp-main-icon"
2424
, ID: "vpBtnToggle"
2525
, NAME: "toggle-vp"

js/com/component/PopupComponent.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,20 @@ define([
792792
open() {
793793
vpLog.display(VP_LOG_TYPE.DEVELOP, 'open popup', this);
794794
this.loadState();
795+
795796
this.show();
797+
798+
// set popup position if its top-left side is outside of view
799+
let pos = $(this.wrapSelector()).position();
800+
if (pos) {
801+
if (pos.top < 0) {
802+
$(this.wrapSelector()).css({ top: 0 });
803+
}
804+
if (pos.left < 0) {
805+
$(this.wrapSelector()).css({ left: 0 });
806+
}
807+
}
808+
796809
this._bindCodemirror();
797810

798811
$(this.eventTarget).trigger({

js/m_apps/Frame.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,12 +1302,12 @@ define([
13021302
var tab = content.addtype;
13031303
if (tab == 'value') {
13041304
var value = com_util.convertToStr(content.value, content.valueastext);
1305-
code.appendFormat("{0}[[{1}]] = {2}", tempObj, name, value);
1305+
code.appendFormat("{0}[{1}] = {2}", tempObj, name, value);
13061306
} else if (tab == 'calculation') {
13071307
var { var1col, oper, var2col } = content;
13081308
var var1code = tempObj + "['" + var1col + "']";
13091309
var var2code = tempObj + "['" + var2col + "']";
1310-
code.appendFormat('{0}[[{1}]] = {2} {3} {4}', tempObj, name, var1code, oper, var2code);
1310+
code.appendFormat('{0}[{1}] = {2} {3} {4}', tempObj, name, var1code, oper, var2code);
13111311
} else if (tab == 'replace') {
13121312
var replaceStr = new com_String();
13131313
var useRegex = content['useregex'];
@@ -1325,7 +1325,7 @@ define([
13251325
if (selectedName && selectedName != '') {
13261326
selectedName = '[[' + selectedName + ']]';
13271327
}
1328-
code.appendFormat("{0}[[{1}]] = {2}{3}.replace({{4}}", tempObj, name, tempObj, selectedName, replaceStr);
1328+
code.appendFormat("{0}[{1}] = {2}{3}.replace({{4}}", tempObj, name, tempObj, selectedName, replaceStr);
13291329
if (useRegex) {
13301330
code.append(', regex=True');
13311331
}
@@ -1334,7 +1334,7 @@ define([
13341334
var value = com_util.convertToStr(content.value, content.valueastext);
13351335
code.appendFormat("{0} = {1}", content.subset, value);
13361336
} else if (tab == 'apply') {
1337-
code.appendFormat("{0}[[{1}]] = {2}[{3}].apply({4})", tempObj, name, tempObj, content.column, content.apply);
1337+
code.appendFormat("{0}[{1}] = {2}[{3}].apply({4})", tempObj, name, tempObj, content.column, content.apply);
13381338
}
13391339
break;
13401340
case FRAME_EDIT_TYPE.ADD_ROW:

0 commit comments

Comments
 (0)