Commit 1b9efda5 authored by Alexey.Musinov's avatar Alexey.Musinov Committed by Alexander.Trofimov

offlineMode: добавлени картинки по координатам

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47365 954022d7-b5bf-4e40-9824-e11837661b57
parent 408c1857
...@@ -2416,12 +2416,20 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -2416,12 +2416,20 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
} }
if (!window['scriptBridge']['addFileImage']) { if (!window['scriptBridge']['addFileImage']) {
window['scriptBridge']['addFileImage'] = function(imageUrl) { window['scriptBridge']['addFileImage'] = function(imageUrl, x, y) {
t.wb.controller.isSelectDrawingObject = true; t.wb.controller.isSelectDrawingObject = true;
var ws = t.wb.getWorksheet(); var ws = t.wb.getWorksheet();
ws.model.workbook.handlers.trigger("asc_onStartAction", c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.LoadImage); ws.model.workbook.handlers.trigger("asc_onStartAction", c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.LoadImage);
ws.objectRender.addImageDrawingObject(imageUrl, false, null);
var options = null;
if (x && y) {
var picker = ws.objectRender.getPositionInfo(x,y);
options = {cell: {col: picker.col, row: picker.row}};
console.log(picker);
}
ws.objectRender.addImageDrawingObject(imageUrl, false, options);
ws.model.workbook.handlers.trigger("asc_onEndAction", c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.LoadImage); ws.model.workbook.handlers.trigger("asc_onEndAction", c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.LoadImage);
}; };
} }
......
...@@ -2486,8 +2486,14 @@ function BinaryWorksheetsTableWriter(memory, wb, oSharedStrings, oDrawings, aDxf ...@@ -2486,8 +2486,14 @@ function BinaryWorksheetsTableWriter(memory, wb, oSharedStrings, oDrawings, aDxf
} }
else else
{ {
if ( (null != oDrawing.imageUrl) && ("" != oDrawing.imageUrl)) if ( (null != oDrawing.imageUrl) && ("" != oDrawing.imageUrl)) {
this.bs.WriteItem(c_oSer_DrawingType.Pic, function(){oThis.WritePic(oDrawing.imageUrl);});
if (window['scriptBridge']) {
this.bs.WriteItem(c_oSer_DrawingType.Pic, function(){oThis.WritePic(oDrawing.imageUrl.replace(/^.*(\\|\/|\:)/, ''));});
} else {
this.bs.WriteItem(c_oSer_DrawingType.Pic, function(){oThis.WritePic(oDrawing.imageUrl);});
}
}
} }
}; };
this.WriteFromTo = function(oFromTo) this.WriteFromTo = function(oFromTo)
......
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