Refactoring

This commit is contained in:
Julia Radzhabova 2020-06-18 18:43:27 +03:00
parent 1c80bea9fd
commit b621f6f273

View file

@ -109,6 +109,8 @@ define([
}, },
zoomDocument: function(d,e) { zoomDocument: function(d,e) {
if (!this.api) return;
switch (d) { switch (d) {
case 'up': case 'up':
var f = Math.floor(this.api.asc_getZoom() * 10)/10; var f = Math.floor(this.api.asc_getZoom() * 10)/10;
@ -125,7 +127,7 @@ define([
}, },
menuZoomClick: function(menu, item) { menuZoomClick: function(menu, item) {
this.api.asc_setZoom(item.value/100); this.api && this.api.asc_setZoom(item.value/100);
Common.NotificationCenter.trigger('edit:complete', this.statusbar); Common.NotificationCenter.trigger('edit:complete', this.statusbar);
}, },