From bccbc78a5e472118d5c2fd17ec5b69fa882e9d65 Mon Sep 17 00:00:00 2001 From: vivid Date: Tue, 9 Aug 2016 19:03:42 +0900 Subject: [PATCH] update variable view --- dist/entry.js | 2 +- dist/entry.min.js | 2 +- src/variable.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/entry.js b/dist/entry.js index b0855255e0..2ffa734b00 100644 --- a/dist/entry.js +++ b/dist/entry.js @@ -13562,7 +13562,7 @@ Entry.Variable.prototype.getMinValue = function() { }; Entry.Variable.prototype.setMinValue = function(b) { this.minValue_ = b = b || 0; - this.value_ < b && (this.value_ = b); + this.value_ < b && this.setValue(b); this.updateView(); this.isMinFloat = Entry.isFloat(this.minValue_); }; diff --git a/dist/entry.min.js b/dist/entry.min.js index 90436b52a6..7289b83caf 100644 --- a/dist/entry.min.js +++ b/dist/entry.min.js @@ -1248,7 +1248,7 @@ Entry.Variable.prototype.toJSON=function(){var b={};b.name=this.name_;b.id=this. Entry.Variable.prototype.clone=function(){var b=this.toJSON();b.isClone=!0;return b=new Entry.Variable(b)};Entry.Variable.prototype.getType=function(){return this.type};Entry.Variable.prototype.setType=function(b){this.type=b};Entry.Variable.prototype.getSlidePosition=function(b){var a=this.minValue_;return Math.abs(this.value_-a)/Math.abs(this.maxValue_-a)*b+10}; Entry.Variable.prototype.setSlideCommandX=function(b){var a=this.valueSetter_.graphics.command;b=Math.max("undefined"==typeof b?10:b,10);b=Math.min(this.maxWidth+10,b);a.x=b;this.updateSlideValueByView()}; Entry.Variable.prototype.updateSlideValueByView=function(){var b=Math.max(this.valueSetter_.graphics.command.x-10,0)/this.maxWidth;0>b&&(b=0);1c&&(b=this.maxValue_);this.isFloatPoint()||(b=Math.round(b));this.setValue(b)};Entry.Variable.prototype.getMinValue=function(){return this.minValue_}; -Entry.Variable.prototype.setMinValue=function(b){this.minValue_=b=b||0;this.value_b&&(this.value_=b);this.updateView();this.isMaxFloat=Entry.isFloat(this.maxValue_)};Entry.Variable.prototype.isFloatPoint=function(){return this.isMaxFloat||this.isMinFloat};Entry.VariableContainer=function(){this.variables_=[];this.messages_=[];this.lists_=[];this.functions_={};this.viewMode_="all";this.selected=null;this.variableAddPanel={isOpen:!1,info:{object:null,isCloud:!1}};this.listAddPanel={isOpen:!1,info:{object:null,isCloud:!1}};this.selectedVariable=null;this._variableRefs=[];this._messageRefs=[];this._functionRefs=[]}; +Entry.Variable.prototype.setMinValue=function(b){this.minValue_=b=b||0;this.value_b&&(this.value_=b);this.updateView();this.isMaxFloat=Entry.isFloat(this.maxValue_)};Entry.Variable.prototype.isFloatPoint=function(){return this.isMaxFloat||this.isMinFloat};Entry.VariableContainer=function(){this.variables_=[];this.messages_=[];this.lists_=[];this.functions_={};this.viewMode_="all";this.selected=null;this.variableAddPanel={isOpen:!1,info:{object:null,isCloud:!1}};this.listAddPanel={isOpen:!1,info:{object:null,isCloud:!1}};this.selectedVariable=null;this._variableRefs=[];this._messageRefs=[];this._functionRefs=[]}; Entry.VariableContainer.prototype.createDom=function(b){var a=this;this.view_=b;var c=Entry.createElement("table");c.addClass("entryVariableSelectorWorkspace");this.view_.appendChild(c);var d=Entry.createElement("tr");c.appendChild(d);var e=this.createSelectButton("all");e.setAttribute("rowspan","2");e.addClass("selected","allButton");d.appendChild(e);d.appendChild(this.createSelectButton("variable",Entry.variableEnable));d.appendChild(this.createSelectButton("message",Entry.messageEnable));d=Entry.createElement("tr"); d.appendChild(this.createSelectButton("list",Entry.listEnable));d.appendChild(this.createSelectButton("func",Entry.functionEnable));c.appendChild(d);c=Entry.createElement("ul");c.addClass("entryVariableListWorkspace");this.view_.appendChild(c);this.listView_=c;c=Entry.createElement("li");c.addClass("entryVariableAddWorkspace");c.addClass("entryVariableListElementWorkspace");c.innerHTML="+ "+Lang.Workspace.variable_add;var f=this;this.variableAddButton_=c;c.bindOnClick(function(b){b=f.variableAddPanel; var c=b.view.name.value.trim();b.isOpen?c&&0!==c.length?a.addVariable():(b.view.addClass("entryRemove"),b.isOpen=!1):(b.view.removeClass("entryRemove"),b.view.name.focus(),b.isOpen=!0)});this.generateVariableAddView();this.generateListAddView();this.generateVariableSplitterView();this.generateVariableSettingView();this.generateListSettingView();c=Entry.createElement("li");c.addClass("entryVariableAddWorkspace");c.addClass("entryVariableListElementWorkspace");c.innerHTML="+ "+Lang.Workspace.message_create; diff --git a/src/variable.js b/src/variable.js index 656204e7cd..edcb76d9d5 100644 --- a/src/variable.js +++ b/src/variable.js @@ -819,7 +819,7 @@ Entry.Variable.prototype.setMinValue = function(minValue) { minValue = minValue || 0; this.minValue_ = minValue; if (this.value_ < minValue) - this.value_ = minValue; + this.setValue(minValue); this.updateView(); this.isMinFloat = Entry.isFloat(this.minValue_); };