Commit c3709515 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

WorkbookView конструктор от Html элемента

init->_init
WorkbookView хранит теперь Html элементы
add _canResize
CellEditor конструктор от Html элемента
asc_CEventsController конструктор от Html элемента

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@53379 954022d7-b5bf-4e40-9824-e11837661b57
parent f7f8707a
...@@ -1731,7 +1731,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -1731,7 +1731,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
this.wbModel, this.wbModel,
this.controller, this.controller,
this.handlers, this.handlers,
$("#" + this.HtmlElementName), this.HtmlElement,
$("#" + this.topLineEditorName), $("#" + this.topLineEditorName),
this, this,
this.collaborativeEditing, this.collaborativeEditing,
......
...@@ -90,9 +90,11 @@ ...@@ -90,9 +90,11 @@
//---declaration--- //---declaration---
this.canvasOuter = undefined; this.canvasOuter = undefined;
this.canvasOuterStyle = undefined;
this.canvas = undefined; this.canvas = undefined;
this.canvasOverlay = undefined; this.canvasOverlay = undefined;
this.cursor = undefined; this.cursor = undefined;
this.cursorStyle = undefined;
this.cursorTID = undefined; this.cursorTID = undefined;
this.cursorPos = 0; this.cursorPos = 0;
this.topLineIndex = 0; this.topLineIndex = 0;
...@@ -126,7 +128,7 @@ ...@@ -126,7 +128,7 @@
this.isUpdateValue = true; // Обновлять ли состояние строки при вводе в TextArea this.isUpdateValue = true; // Обновлять ли состояние строки при вводе в TextArea
//----------------- //-----------------
this.init(); this._init();
return this; return this;
} }
...@@ -165,37 +167,36 @@ ...@@ -165,37 +167,36 @@
reFormula: /^([a-z_][a-z0-9_]*)/i, reFormula: /^([a-z_][a-z0-9_]*)/i,
init: function () { _init: function () {
var t = this; var t = this;
var z = parseInt(t.settings.canvasZindex); var z = parseInt(t.settings.canvasZindex);
t.canvasOuter = t.element.find("#ce-canvas-outer"); if (null != this.element) {
if (t.canvasOuter.length < 1) { t.canvasOuter = document.createElement('div');
t.canvasOuter = $('<div id="ce-canvas-outer"/>') t.canvasOuter.id = "ce-canvas-outer";
.css("display", "none") t.canvasOuter.style.display = "none";
.css("z-index", z) t.canvasOuter.style.zIndex = z;
.appendTo(t.element); var innerHTML = '<canvas id="ce-canvas" style="z-index: ' + (z+1) + '"></canvas>';
t.canvas = $('<canvas id="ce-canvas"/>') innerHTML += '<canvas id="ce-canvas-overlay" style="z-index: ' + (z+2) + '; cursor: ' + t.settings.cursorShape + '"></canvas>';
.css("z-index", z+1) innerHTML += '<div id="ce-cursor" style="display: none; z-index: ' + (z+3) + '"></div>';
.appendTo(t.canvasOuter); t.canvasOuter.innerHTML = innerHTML;
t.canvasOverlay = $('<canvas id="ce-canvas-overlay"/>') this.element.appendChild(t.canvasOuter);
.css("z-index", z+2)
.css("cursor", t.settings.cursorShape) t.canvasOuterStyle = t.canvasOuter.style;
.appendTo(t.canvasOuter); t.canvas = document.getElementById("ce-canvas");
t.cursor = $('<div id="ce-cursor"/>') t.canvasOverlay = document.getElementById("ce-canvas-overlay");
.css("display", "none") t.cursor = document.getElementById("ce-cursor");
.css("z-index", z+3) t.cursorStyle = t.cursor.style;
.appendTo(t.canvasOuter);
} }
// create text render // create text render
t.drawingCtx = asc_DC({canvas: t.canvas[0], units: 1/*pt*/, fmgrGraphics: this.fmgrGraphics, font: this.m_oFont}); t.drawingCtx = asc_DC({canvas: t.canvas, units: 1/*pt*/, fmgrGraphics: this.fmgrGraphics, font: this.m_oFont});
t.overlayCtx = asc_DC({canvas: t.canvasOverlay[0], units: 1/*pt*/, fmgrGraphics: this.fmgrGraphics, font: this.m_oFont}); t.overlayCtx = asc_DC({canvas: t.canvasOverlay, units: 1/*pt*/, fmgrGraphics: this.fmgrGraphics, font: this.m_oFont});
t.textRender = asc_TR(t.drawingCtx); t.textRender = asc_TR(t.drawingCtx);
t.textRender.setDefaultFont(t.settings.font.clone()); t.textRender.setDefaultFont(t.settings.font.clone());
// bind event handlers // bind event handlers
t.canvasOverlay $(t.canvasOverlay)
.off("." + namespace) .off("." + namespace)
.on("mousedown." + namespace, function () {return t._onMouseDown.apply(t, arguments);}) .on("mousedown." + namespace, function () {return t._onMouseDown.apply(t, arguments);})
.on("mouseup." + namespace, function () {return t._onMouseUp.apply(t, arguments);}) .on("mouseup." + namespace, function () {return t._onMouseUp.apply(t, arguments);})
...@@ -292,7 +293,8 @@ ...@@ -292,7 +293,8 @@
t.isTopLineActive = false; t.isTopLineActive = false;
t.input.removeClass("focused"); t.input.removeClass("focused");
t._hideCursor(); t._hideCursor();
t.canvasOuter.hide(); // hide
t.canvasOuterStyle.display = "none";
t.handlers.trigger("closed"); t.handlers.trigger("closed");
return true; return true;
...@@ -966,19 +968,17 @@ ...@@ -966,19 +968,17 @@
var t = this; var t = this;
var z = parseInt(t.settings.canvasZindex); var z = parseInt(t.settings.canvasZindex);
$(t.canvasOuter) t.canvasOuterStyle.left = (t.left * t.kx) + "px";
.css("display", "none") t.canvasOuterStyle.top = (t.top * t.ky) + "px";
.css("left", (t.left * t.kx) + "px") t.canvasOuterStyle.width = ((t.right - t.left) * t.kx - 1) + "px";
.css("top", (t.top * t.ky) + "px") t.canvasOuterStyle.height = ((t.bottom - t.top) * t.ky - 1) + "px";
.css("width", ((t.right - t.left) * t.kx - 1) + "px") t.canvasOuterStyle.zIndex = t.top <= 0 ? -1 : z;
.css("height", ((t.bottom - t.top) * t.ky - 1) + "px")
.css("z-index", t.top <= 0 ? -1 : z);
$(t.canvas).add(t.canvasOverlay) t.canvas.width = t.canvasOverlay.width = (t.right - t.left) * t.kx - 1;
.attr("width", (t.right - t.left) * t.kx - 1) t.canvas.height = t.canvasOverlay.height = (t.bottom - t.top) * t.ky - 1;
.attr("height", (t.bottom - t.top) * t.ky - 1);
t.canvasOuter.show(); // show
t.canvasOuterStyle.display = "block";
}, },
_renderText: function (dy) { _renderText: function (dy) {
...@@ -1046,19 +1046,24 @@ ...@@ -1046,19 +1046,24 @@
var t = this; var t = this;
if (true === t.options.isHideCursor || t.isTopLineActive === true) {return;} if (true === t.options.isHideCursor || t.isTopLineActive === true) {return;}
window.clearInterval(t.cursorTID); window.clearInterval(t.cursorTID);
t.cursor.show(); t.cursorStyle.display = "block";
t.cursorTID = window.setInterval(function () {t.cursor.toggle();}, t.settings.blinkInterval); t.cursorTID = window.setInterval(function () {
if ("block" === t.cursorStyle.display)
t.cursorStyle.display = "none";
else
t.cursorStyle.display = "block";
}, t.settings.blinkInterval);
}, },
_hideCursor: function () { _hideCursor: function () {
var t = this; var t = this;
window.clearInterval(t.cursorTID); window.clearInterval(t.cursorTID);
t.cursor.hide(); t.cursorStyle.display = "none";
}, },
_updateCursorPosition: function (redrawText) { _updateCursorPosition: function (redrawText) {
var t = this; var t = this;
var h = t.canvas.innerHeight(); var h = t.canvas.height;
var y = - t.textRender.calcLineOffset(t.topLineIndex); var y = - t.textRender.calcLineOffset(t.topLineIndex);
var cur = t.textRender.calcCharOffset(t.cursorPos); var cur = t.textRender.calcCharOffset(t.cursorPos);
var charsCount = t.textRender.getCharsCount(); var charsCount = t.textRender.getCharsCount();
...@@ -1088,10 +1093,9 @@ ...@@ -1088,10 +1093,9 @@
if (dy !== undefined || redrawText) {t._renderText(y);} if (dy !== undefined || redrawText) {t._renderText(y);}
t.cursor t.cursorStyle.left = curLeft + "px";
.css("left", curLeft + "px") t.cursorStyle.top = curTop + "px";
.css("top", curTop + "px") t.cursorStyle.height = curHeight + "px";
.css("height", curHeight + "px");
if (cur) {t.input.scrollTop(t.input.height() * cur.lineIndex);} if (cur) {t.input.scrollTop(t.input.height() * cur.lineIndex);}
if (t.isTopLineActive && !t.skipTLUpdate) {t._updateTopLineCurPos();} if (t.isTopLineActive && !t.skipTLUpdate) {t._updateTopLineCurPos();}
...@@ -1952,7 +1956,7 @@ ...@@ -1952,7 +1956,7 @@
/** @param event {jQuery.Event} */ /** @param event {jQuery.Event} */
_getCoordinates: function (event) { _getCoordinates: function (event) {
var t = this; var t = this;
var offs = t.canvasOverlay.offset(); var offs = $(t.canvasOverlay).offset();
var x = (event.pageX - offs.left) / t.kx; var x = (event.pageX - offs.left) / t.kx;
var y = (event.pageY - offs.top) / t.ky; var y = (event.pageY - offs.top) / t.ky;
return {x: x, y: y}; return {x: x, y: y};
......
...@@ -130,42 +130,32 @@ ...@@ -130,42 +130,32 @@
this.element.onselectstart = function () {return false;}; this.element.onselectstart = function () {return false;};
} }
this.element $(this.element)
.on("mousedown", function () {return self._onMouseDown.apply(self, arguments);}) .on("mousedown", function () {return self._onMouseDown.apply(self, arguments);})
.on("mouseup", function () {return self._onMouseUp.apply(self, arguments);}) .on("mouseup", function () {return self._onMouseUp.apply(self, arguments);})
.on("mousemove", function () {return self._onMouseMove.apply(self, arguments);}) .on("mousemove", function () {return self._onMouseMove.apply(self, arguments);})
.on("mouseleave", function () {return self._onMouseLeave.apply(self, arguments);}) .on("mouseleave", function () {return self._onMouseLeave.apply(self, arguments);})
.on("mousewheel", function () {return self._onMouseWheel.apply(self, arguments);}) .on("mousewheel", function () {return self._onMouseWheel.apply(self, arguments);})
.on("dblclick", function () {return self._onMouseDblClick.apply(self, arguments);}); .on("dblclick", function () {return self._onMouseDblClick.apply(self, arguments);});
//.on("touchstart", function () {self._onMouseDown(arguments[0].originalEvent.touches[0]);return false;})
//.on("touchmove", function () {self._onMouseMove(arguments[0].originalEvent.touches[0]);return false;})
//.on("touchend", function () {self._onMouseUp(arguments[0].originalEvent.changedTouches[0]);return false;});
// Курсор для графических объектов. Определяем mousedown и mouseup для выделения текста. // Курсор для графических объектов. Определяем mousedown и mouseup для выделения текста.
var oShapeCursor = $("#id_target_cursor"); var oShapeCursor = $("#id_target_cursor");
if ( oShapeCursor ) { if (oShapeCursor) {
oShapeCursor oShapeCursor
.on("mousedown", function () { .on("mousedown", function () {return self._onMouseDown.apply(self, arguments);})
return self._onMouseDown.apply(self, arguments); .on("mouseup", function () {return self._onMouseUp.apply(self, arguments);})
}) .on("mousemove", function () {return self._onMouseMove.apply(self, arguments);});
.on("mouseup", function () {
return self._onMouseUp.apply(self, arguments);
})
.on("mousemove", function () {
return self._onMouseMove.apply(self, arguments);
});
} }
this.element[0].ontouchstart = function (e){ this.element.ontouchstart = function (e) {
self._onMouseDown(e.touches[0]); self._onMouseDown(e.touches[0]);
return false; return false;
}; };
this.element[0].ontouchmove = function (e){ this.element.ontouchmove = function (e) {
self._onMouseMove(e.touches[0]); self._onMouseMove(e.touches[0]);
return false; return false;
}; };
this.element[0].ontouchend = function (e){ this.element.ontouchend = function (e) {
self._onMouseUp(e.changedTouches[0]); self._onMouseUp(e.changedTouches[0]);
return false; return false;
}; };
...@@ -291,7 +281,7 @@ ...@@ -291,7 +281,7 @@
// Мы изменяли размеры колонки/строки, не редактируем ячейку // Мы изменяли размеры колонки/строки, не редактируем ячейку
t.isCellEditMode = false; t.isCellEditMode = false;
// Обновим состояние курсора // Обновим состояние курсора
t.handlers.trigger("updateWorksheet", t.element[0], coord.x, coord.y, event.ctrlKey, function(info){t.targetInfo = info;}); t.handlers.trigger("updateWorksheet", t.element, coord.x, coord.y, event.ctrlKey, function(info){t.targetInfo = info;});
} }
}); });
}, 100); }, 100);
...@@ -311,11 +301,12 @@ ...@@ -311,11 +301,12 @@
_createScrollBars: function () { _createScrollBars: function () {
var self = this, opt = this.settings; var self = this, opt = this.settings;
var widget = $(this.widget);
// vertical scroll bar // vertical scroll bar
this.vsb = this.widget.find("#ws-v-scrollbar"); this.vsb = widget.find("#ws-v-scrollbar");
if (this.vsb.length < 1) { if (this.vsb.length < 1) {
this.vsb = $('<div id="ws-v-scrollbar"><div id="ws-v-scroll-helper"/></div>').appendTo(this.widget); this.vsb = $('<div id="ws-v-scrollbar"><div id="ws-v-scroll-helper"/></div>').appendTo(widget);
} }
if (!this.vsbApi) { if (!this.vsbApi) {
this.vsbApi = new ScrollObject( this.vsb[0].id,opt); this.vsbApi = new ScrollObject( this.vsb[0].id,opt);
...@@ -340,18 +331,18 @@ ...@@ -340,18 +331,18 @@
} }
// horizontal scroll bar // horizontal scroll bar
this.hsb = this.widget.find("#ws-h-scrollbar"); this.hsb = widget.find("#ws-h-scrollbar");
if (this.hsb.length < 1) { if (this.hsb.length < 1) {
this.hsb = $('<div id="ws-h-scrollbar"><div id="ws-h-scroll-helper"/></div>').appendTo(this.widget); this.hsb = $('<div id="ws-h-scrollbar"><div id="ws-h-scroll-helper"/></div>').appendTo(widget);
} }
if (!this.hsbApi) { if (!this.hsbApi) {
this.hsbApi = new ScrollObject( this.hsb[0].id, $.extend(true, {}, opt, {wheelScrollLines: 1})); this.hsbApi = new ScrollObject( this.hsb[0].id, $.extend(true, {}, opt, {wheelScrollLines: 1}));
this.hsbApi.bind("scrollhorizontal",function(evt){ this.hsbApi.bind("scrollhorizontal",function(evt){
self.handlers.trigger("scrollX", evt.scrollPositionX / opt.hscrollStep); self.handlers.trigger("scrollX", evt.scrollPositionX / opt.hscrollStep);
}) });
this.hsbApi.bind("scrollHEnd",function(evt){ this.hsbApi.bind("scrollHEnd",function(evt){
self.handlers.trigger("addColumn",true); self.handlers.trigger("addColumn",true);
}) });
this.hsbApi.onLockMouse = function(){ this.hsbApi.onLockMouse = function(){
$(window) $(window)
.on("mousemove.scroll", function (e) { .on("mousemove.scroll", function (e) {
...@@ -367,8 +358,8 @@ ...@@ -367,8 +358,8 @@
} }
// right bottom corner // right bottom corner
if (this.widget.find("#ws-scrollbar-corner").length < 1) { if (widget.find("#ws-scrollbar-corner").length < 1) {
$('<div id="ws-scrollbar-corner"/>').appendTo(this.widget); $('<div id="ws-scrollbar-corner"/>').appendTo(widget);
} }
}, },
...@@ -1373,11 +1364,11 @@ ...@@ -1373,11 +1364,11 @@
if (asc["editor"].isStartAddShape || graphicsInfo) { if (asc["editor"].isStartAddShape || graphicsInfo) {
t.handlers.trigger("graphicObjectMouseMove", event, coord.x, coord.y); t.handlers.trigger("graphicObjectMouseMove", event, coord.x, coord.y);
t.handlers.trigger("updateWorksheet", t.element[0], coord.x, coord.y, event.ctrlKey, function(info){t.targetInfo = info;}); t.handlers.trigger("updateWorksheet", t.element, coord.x, coord.y, event.ctrlKey, function(info){t.targetInfo = info;});
return true; return true;
} }
t.handlers.trigger("updateWorksheet", t.element[0], coord.x, coord.y, event.ctrlKey, function(info){t.targetInfo = info;}); t.handlers.trigger("updateWorksheet", t.element, coord.x, coord.y, event.ctrlKey, function(info){t.targetInfo = info;});
return true; return true;
}, },
...@@ -1387,7 +1378,7 @@ ...@@ -1387,7 +1378,7 @@
this.hasCursor = false; this.hasCursor = false;
if (!this.isSelectMode && !this.isResizeMode && !this.isMoveResizeRange) { if (!this.isSelectMode && !this.isResizeMode && !this.isMoveResizeRange) {
this.targetInfo = undefined; this.targetInfo = undefined;
this.handlers.trigger("updateWorksheet", this.element[0]); this.handlers.trigger("updateWorksheet", this.element);
} }
if (this.isMoveRangeMode) { if (this.isMoveRangeMode) {
t.moveRangeTimerId = window.setTimeout(function(){t._moveRangeHandle2(event)},0); t.moveRangeTimerId = window.setTimeout(function(){t._moveRangeHandle2(event)},0);
...@@ -1411,7 +1402,7 @@ ...@@ -1411,7 +1402,7 @@
} }
var self = this; var self = this;
delta *= event.shiftKey ? 1 : this.settings.wheelScrollLines; delta *= event.shiftKey ? 1 : this.settings.wheelScrollLines;
this.handlers.trigger("updateWorksheet", this.element[0], /*x*/undefined, /*y*/undefined, /*ctrlKey*/undefined, this.handlers.trigger("updateWorksheet", this.element, /*x*/undefined, /*y*/undefined, /*ctrlKey*/undefined,
function () { function () {
event.shiftKey ? self.scrollHorizontal(-delta,event) : self.scrollVertical(-delta,event); event.shiftKey ? self.scrollHorizontal(-delta,event) : self.scrollVertical(-delta,event);
self._onMouseMove(event); self._onMouseMove(event);
...@@ -1439,7 +1430,7 @@ ...@@ -1439,7 +1430,7 @@
/** @param event {jQuery.Event} */ /** @param event {jQuery.Event} */
_getCoordinates: function (event) { _getCoordinates: function (event) {
var offs = this.element.offset(); var offs = $(this.element).offset();
var x = event.pageX - offs.left; var x = event.pageX - offs.left;
var y = event.pageY - offs.top; var y = event.pageY - offs.top;
return {x: x, y: y}; return {x: x, y: y};
......
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
this.defaultFont = new asc_FP(this.model.getDefaultFont(), this.model.getDefaultSize()); this.defaultFont = new asc_FP(this.model.getDefaultFont(), this.model.getDefaultSize());
//----------------------- //-----------------------
this.init(fontRenderingMode); this._init(fontRenderingMode);
return this; return this;
} }
...@@ -110,48 +110,45 @@ ...@@ -110,48 +110,45 @@
constructor: WorkbookView, constructor: WorkbookView,
defaults: { defaults: {
worksheetDefaults: {} worksheetDefaults: {},
scroll: {
widthPx : 16,
heightPx: 16
}
}, },
init: function (fontRenderingMode) { _init: function (fontRenderingMode) {
var self = this; var self = this;
// Init font managers rendering // Init font managers rendering
// Изначально мы инициализируем c_oAscFontRenderingModeType.hintingAndSubpixeling // Изначально мы инициализируем c_oAscFontRenderingModeType.hintingAndSubpixeling
this.setFontRenderingMode(fontRenderingMode, /*isInit*/true); this.setFontRenderingMode(fontRenderingMode, /*isInit*/true);
// add style
var _head = document.getElementsByTagName('head')[0]; var _head = document.getElementsByTagName('head')[0];
var style0 = document.createElement('style'); var style0 = document.createElement('style');
style0.type = 'text/css'; style0.type = 'text/css';
style0.innerHTML = ".block_elem { position:absolute;padding:0;margin:0; }"; style0.innerHTML = ".block_elem { position:absolute;padding:0;margin:0; }";
_head.appendChild(style0); _head.appendChild(style0);
if (!window["NATIVE_EDITOR_ENJINE"]) // create canvas
{ if (null != this.element) {
// create canvas this.element.innerHTML = '<div id="ws-canvas-outer">\
var outer = this.element.find("#ws-canvas-outer"); <canvas id="ws-canvas"></canvas>\
if (outer.length < 1) { <canvas id="ws-canvas-overlay"></canvas>\
outer = $('<div id="ws-canvas-outer"><canvas id="ws-canvas"/><canvas id="ws-canvas-overlay"/><canvas id=\"id_target_cursor\" class=\"block_elem\" width=\"1\" height=\"1\" style=\"width:2px;height:13px;display:none;z-index:1004;\"></canvas></div>') <canvas id="id_target_cursor" class="block_elem" width="1" height="1"\
.appendTo(this.element); style="width:2px;height:13px;display:none;z-index:1004;"></canvas>\
} </div>';
this.canvas = this.element.find("#ws-canvas")
.attr("width", outer.width()) this.canvas = document.getElementById("ws-canvas");
.attr("height", outer.height()); this.canvasOverlay = document.getElementById("ws-canvas-overlay");
//this._canResize(); ToDo должно отрабатывать, но нам приходит resize сверху
this.canvasOverlay = this.element.find("#ws-canvas-overlay")
.attr("width", outer.width())
.attr("height", outer.height());
}
else
{
this.canvas = new Array(); this.canvas.push(document.createElement("canvas"));
this.canvasOverlay = new Array(); this.canvasOverlay.push(document.createElement("canvas"));
} }
this.buffers.main = asc_DC({canvas: this.canvas[0], units: 1/*pt*/, this.buffers.main = asc_DC({canvas: this.canvas, units: 1/*pt*/,
fmgrGraphics: this.fmgrGraphics, font: this.m_oFont}); fmgrGraphics: this.fmgrGraphics, font: this.m_oFont});
this.buffers.overlay = asc_DC({canvas: this.canvasOverlay[0], units: 1/*pt*/, this.buffers.overlay = asc_DC({canvas: this.canvasOverlay, units: 1/*pt*/,
fmgrGraphics: this.fmgrGraphics, font: this.m_oFont}); fmgrGraphics: this.fmgrGraphics, font: this.m_oFont});
this.buffers.overlay.ctx.isOverlay = true; // Для разруливания _activateOverlayCtx / _deactivateOverlayCtx this.buffers.overlay.ctx.isOverlay = true; // Для разруливания _activateOverlayCtx / _deactivateOverlayCtx
...@@ -1148,26 +1145,26 @@ ...@@ -1148,26 +1145,26 @@
this.wsActive = -1; this.wsActive = -1;
}, },
/** @param event {jQuery.Event} */ _canResize: function() {
resize: function (event) { var oldWidth = this.canvas.width;
var outer = $("#ws-canvas-outer"); var oldHeight = this.canvas.height;
var width = this.element.offsetWidth - this.defaults.scroll.widthPx;
var height = this.element.offsetHeight - this.defaults.scroll.heightPx;
var oldWidth = this.canvas.attr("width"); if (oldWidth === width && oldHeight === height)
var oldHeight = this.canvas.attr("width"); return false;
var width = outer.width();
var height = outer.height();
if (oldWidth == width && oldHeight == height)
return;
this.canvas this.canvas.width = this.canvasOverlay.width = width;
.attr("width", width) this.canvas.height = this.canvasOverlay.height = height;
.attr("height", height); return true;
this.canvasOverlay },
.attr("width", width)
.attr("height", height);
this.getWorksheet().resize(); /** @param event {jQuery.Event} */
this.showWorksheet(undefined, true); resize: function (event) {
if (this._canResize()) {
this.getWorksheet().resize();
this.showWorksheet(undefined, true);
}
}, },
// Получаем свойство: редактируем мы сейчас или нет // Получаем свойство: редактируем мы сейчас или нет
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment