Commit 81385f1c authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Обновляем размеры (чуть ниже, потому что должны быть проинициализированы ctx)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@54270 954022d7-b5bf-4e40-9824-e11837661b57
parent 31383223
......@@ -154,7 +154,6 @@
this.canvasOverlay = document.getElementById("ws-canvas-overlay");
this.canvasGraphic = document.getElementById("ws-canvas-graphic");
this.canvasGraphicOverlay = document.getElementById("ws-canvas-graphic-overlay");
this._canResize();
}
this.buffers.main = asc_DC({canvas: this.canvas, units: 1/*pt*/, fmgrGraphics: this.fmgrGraphics, font: this.m_oFont});
......@@ -164,12 +163,16 @@
this.buffers.mainGraphic = asc_DC({canvas: this.canvasGraphic, units: 1/*pt*/, fmgrGraphics: this.fmgrGraphics, font: this.m_oFont});
this.buffers.overlayGraphic = asc_DC({canvas: this.canvasGraphicOverlay, units: 1/*pt*/, fmgrGraphics: this.fmgrGraphics, font: this.m_oFont});
this.drawingCtx = this.buffers.main;
this.overlayCtx = this.buffers.overlay;
this.drawingGraphicCtx = this.buffers.mainGraphic;
this.overlayGraphicCtx = this.buffers.overlayGraphic;
this.drawingCtxCharts = asc_DC({units: 1/*pt*/, fmgrGraphics: this.fmgrGraphics, font: this.m_oFont});
// Обновляем размеры (чуть ниже, потому что должны быть проинициализированы ctx)
this._canResize();
// Shapes
this.buffers.shapeCtx = new CGraphics();
this.buffers.shapeCtx.init(this.drawingGraphicCtx.ctx, this.drawingGraphicCtx.getWidth(0), this.drawingGraphicCtx.getHeight(0), this.drawingGraphicCtx.getWidth(3), this.drawingGraphicCtx.getHeight(3));
......@@ -179,8 +182,6 @@
this.buffers.shapeOverlayCtx.init(this.overlayGraphicCtx.ctx, this.overlayGraphicCtx.getWidth(0), this.overlayGraphicCtx.getHeight(0), this.overlayGraphicCtx.getWidth(3), this.overlayGraphicCtx.getHeight(3));
this.buffers.shapeOverlayCtx.m_oFontManager = this.fmgrGraphics[2];
this.drawingCtxCharts = asc_DC({units: 1/*pt*/, fmgrGraphics: this.fmgrGraphics, font: this.m_oFont});
this.stringRender = asc_SR(this.buffers.main);
this.stringRender.setDefaultFont(this.defaultFont);
......@@ -1186,11 +1187,8 @@
this.canvas.height = this.canvasOverlay.height = this.canvasGraphic.height = this.canvasGraphicOverlay.height = height;
// При смене ориентации у планшета, сбрасываются флаги у canvas!
if ( this.drawingCtx )
this.drawingCtx.initContextSmoothing();
if ( this.overlayCtx )
this.overlayCtx.initContextSmoothing();
if ( this.drawingCtxCharts )
this.drawingCtxCharts.initContextSmoothing();
return 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