From 78533486690db207d11161f822baa57ed652b20e Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 13 Sep 2016 11:56:42 +0300 Subject: [PATCH] [SSE] Bug with delayed loading of toolbar (clone object properties). --- apps/spreadsheeteditor/main/app/view/Toolbar.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index 28b5f60d1..1f80b2005 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -885,12 +885,19 @@ define([ me.mnuZoomIn = dummyCmp(); me.mnuZoomOut = dummyCmp(); + var clone = function(source) { + var obj = {}; + for (var prop in source) + obj[prop] = (typeof(source[prop])=='object') ? clone(source[prop]) : source[prop]; + return obj; + }; + this.mnuitemHideHeadings = { conf: {checked:false}, setChecked: function(val) { this.conf.checked = val;}, isChecked: function () { return this.conf.checked; } }; - this.mnuitemHideGridlines = _.clone(this.mnuitemHideHeadings); + this.mnuitemHideGridlines = clone(this.mnuitemHideHeadings); this.mnuZoom = { options: {value: 100} };