[SSE] Fix close of scale

This commit is contained in:
Julia Svinareva 2019-10-15 15:42:19 +03:00
parent e424611cfe
commit 373a69cb2e

View file

@ -169,10 +169,10 @@ define([
}, },
_handleInput: function(state) { _handleInput: function(state) {
if (this.options.handler) { if (this.options.handler && state === 'ok') {
this.options.handler.call(this, state, (state == 'ok') ? this.getSettings() : undefined); this.options.handler.call(this, 'ok', this.getSettings());
} }
this.close(); this.close(state);
}, },
onBtnClick: function(event) { onBtnClick: function(event) {
@ -316,6 +316,13 @@ define([
} }
}, },
close: function(state) {
if (this.options.handler && state !== 'ok') {
this.options.handler.call(this, 'cancel', undefined);
}
Common.UI.Window.prototype.close.call(this);
},
textTitle: 'Scale Settings', textTitle: 'Scale Settings',
textWidth: 'Width', textWidth: 'Width',
textHeight: 'Height', textHeight: 'Height',