Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion js/com/com_Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ define([
/**
* Version
*/
Config.version = "2.2.11";
Config.version = "2.2.12";

/**
* Type of mode
Expand Down
2 changes: 1 addition & 1 deletion js/com/com_Const.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ define ([
class Constants { }

Constants.TOOLBAR_BTN_INFO = {
HELP: "Visual Python 2.2.11"
HELP: "Visual Python 2.2.12"
, ICON: "vp-main-icon"
, ID: "vpBtnToggle"
, NAME: "toggle-vp"
Expand Down
13 changes: 13 additions & 0 deletions js/com/component/PopupComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,20 @@ define([
open() {
vpLog.display(VP_LOG_TYPE.DEVELOP, 'open popup', this);
this.loadState();

this.show();

// set popup position if its top-left side is outside of view
let pos = $(this.wrapSelector()).position();
if (pos) {
if (pos.top < 0) {
$(this.wrapSelector()).css({ top: 0 });
}
if (pos.left < 0) {
$(this.wrapSelector()).css({ left: 0 });
}
}

this._bindCodemirror();

$(this.eventTarget).trigger({
Expand Down
8 changes: 4 additions & 4 deletions js/m_apps/Frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -1302,12 +1302,12 @@ define([
var tab = content.addtype;
if (tab == 'value') {
var value = com_util.convertToStr(content.value, content.valueastext);
code.appendFormat("{0}[[{1}]] = {2}", tempObj, name, value);
code.appendFormat("{0}[{1}] = {2}", tempObj, name, value);
} else if (tab == 'calculation') {
var { var1col, oper, var2col } = content;
var var1code = tempObj + "['" + var1col + "']";
var var2code = tempObj + "['" + var2col + "']";
code.appendFormat('{0}[[{1}]] = {2} {3} {4}', tempObj, name, var1code, oper, var2code);
code.appendFormat('{0}[{1}] = {2} {3} {4}', tempObj, name, var1code, oper, var2code);
} else if (tab == 'replace') {
var replaceStr = new com_String();
var useRegex = content['useregex'];
Expand All @@ -1325,7 +1325,7 @@ define([
if (selectedName && selectedName != '') {
selectedName = '[[' + selectedName + ']]';
}
code.appendFormat("{0}[[{1}]] = {2}{3}.replace({{4}}", tempObj, name, tempObj, selectedName, replaceStr);
code.appendFormat("{0}[{1}] = {2}{3}.replace({{4}}", tempObj, name, tempObj, selectedName, replaceStr);
if (useRegex) {
code.append(', regex=True');
}
Expand All @@ -1334,7 +1334,7 @@ define([
var value = com_util.convertToStr(content.value, content.valueastext);
code.appendFormat("{0} = {1}", content.subset, value);
} else if (tab == 'apply') {
code.appendFormat("{0}[[{1}]] = {2}[{3}].apply({4})", tempObj, name, tempObj, content.column, content.apply);
code.appendFormat("{0}[{1}] = {2}[{3}].apply({4})", tempObj, name, tempObj, content.column, content.apply);
}
break;
case FRAME_EDIT_TYPE.ADD_ROW:
Expand Down