Commit 844fcc4c authored by Dmitry.Vikulov's avatar Dmitry.Vikulov Committed by Alexander.Trofimov

add CImage

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47704 954022d7-b5bf-4e40-9824-e11837661b57
parent 5ec065f8
...@@ -2428,7 +2428,7 @@ function DrawingObjects() { ...@@ -2428,7 +2428,7 @@ function DrawingObjects() {
shapeOverlayCtx.put_GlobalAlpha(true, 0.5); shapeOverlayCtx.put_GlobalAlpha(true, 0.5);
shapeOverlayCtx.m_oContext.clearRect(0, 0, shapeOverlayCtx.m_lWidthPix, shapeOverlayCtx.m_lHeightPix); shapeOverlayCtx.m_oContext.clearRect(0, 0, shapeOverlayCtx.m_lWidthPix, shapeOverlayCtx.m_lHeightPix);
_this.controller.drawTracks(shapeOverlayCtx); _this.controller.drawTracks(shapeOverlayCtx);
shapeOverlayCtx.put_GlobalAlpha(true, 1) shapeOverlayCtx.put_GlobalAlpha(true, 1);
} }
_this.showOverlayDrawingObjects = function() { _this.showOverlayDrawingObjects = function() {
...@@ -3160,8 +3160,15 @@ function DrawingObjects() { ...@@ -3160,8 +3160,15 @@ function DrawingObjects() {
obj.image.onload = function() { obj.image.onload = function() {
calculateObjectMetrics(obj, obj.image.width, obj.image.height); calculateObjectMetrics(obj, obj.image.width, obj.image.height);
// CImage
obj.graphicObject = new CImage(obj, _this);
obj.graphicObject.initDefault( pxToMm(obj.getVisibleLeftOffset()), pxToMm(obj.getVisibleTopOffset()), pxToMm(obj.getWidthFromTo()), pxToMm(obj.getHeightFromTo()), imageUrl );
obj.graphicObject.select(_this.controller);
aObjects.push(obj); aObjects.push(obj);
_this.showDrawingObjects(false);
/*aObjects.push(obj);
_this.selectDrawingObject(aObjects.length - 1); _this.selectDrawingObject(aObjects.length - 1);
History.Create_NewPoint(); History.Create_NewPoint();
...@@ -3171,7 +3178,7 @@ function DrawingObjects() { ...@@ -3171,7 +3178,7 @@ function DrawingObjects() {
_this.showDrawingObjects(true); _this.showDrawingObjects(true);
worksheet.model.workbook.handlers.trigger("asc_onEndAction", c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.LoadImage); worksheet.model.workbook.handlers.trigger("asc_onEndAction", c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.LoadImage);
worksheet.autoFilters.drawAutoF(worksheet); worksheet.autoFilters.drawAutoF(worksheet);
worksheet.cellCommentator.drawCommentCells(false); worksheet.cellCommentator.drawCommentCells(false);*/
} }
obj.image.onerror = function() { obj.image.onerror = function() {
...@@ -3933,6 +3940,15 @@ function DrawingObjects() { ...@@ -3933,6 +3940,15 @@ function DrawingObjects() {
_this.controller.drawSelection(autoShapeTrack); _this.controller.drawSelection(autoShapeTrack);
} }
_this.setScrollOffset = function(x_px, y_px) {
if ( shapeCtx || shapeOverlayCtx ) {
//shapeCtx.transform(1, 0, 0, 1, x_px, y_px);
//shapeOverlayCtx.transform(1, 0, 0, 1, x_px, y_px);
}
}
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
// Graphic object mouse events // Graphic object mouse events
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
......
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