Commit d5b1fd9e authored by Dmitry.Vikulov's avatar Dmitry.Vikulov

отрисовка текстуры в меню

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@48184 954022d7-b5bf-4e40-9824-e11837661b57
parent d14b078a
......@@ -2954,6 +2954,7 @@ function DrawingObjects() {
_this.drawingDocument = new CDrawingDocument(this);
_this.drawingDocument.AutoShapesTrack = autoShapeTrack;
_this.drawingDocument.TargetHtmlElement = document.getElementById('id_target_cursor');
_this.drawingDocument.InitGuiCanvasShape(api.shapeElementId);
isViewerMode = function() { return worksheet._trigger("getViewerMode"); };
......@@ -4586,6 +4587,11 @@ function DrawingObjects() {
return new asc_CImageSize( 50, 50, false );
}
_this.sendSelectionChanged = function() {
if ( worksheet )
worksheet._trigger("selectionChanged", worksheet.getSelectionInfo());
}
//-----------------------------------------------------------------------------------
// Graphic object mouse events
//-----------------------------------------------------------------------------------
......
......@@ -114,6 +114,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
this.addShapePreset = "";
this.ImageLoader = window.g_image_loader;
this.ImageLoader.put_Api(this);
this.shapeElementId = null;
/**************************************/
......@@ -2143,6 +2144,10 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
return ws.objectRender.getOriginalImageSize();
},
asc_setInterfaceDrawImagePlaceShape: function(elementId) {
this.shapeElementId = elementId;
},
asyncImageStartLoaded: function() {
},
......@@ -2944,7 +2949,8 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
prot["asc_setGraphicObjectProps"] = prot.asc_setGraphicObjectProps;
prot["asc_getOriginalImageSize"] = prot.asc_getOriginalImageSize;
prot["asc_changeShapeType"] = prot.asc_changeShapeType;
prot["asc_setInterfaceDrawImagePlaceShape"] = prot.asc_setInterfaceDrawImagePlaceShape;
// Cell interface
prot["asc_getCellInfo"] = prot.asc_getCellInfo;
prot["asc_getActiveCellCoord"] = prot.asc_getActiveCellCoord;
......
......@@ -4497,7 +4497,8 @@ function CDrawingDocument(drawingObjects)
if (null == this.LastDrawingUrl)
return;
var _img = this.m_oWordControl.m_oApi.ImageLoader.map_image_index[getFullImageSrc(this.LastDrawingUrl)];
var api = window["Asc"]["editor"];
var _img = api.ImageLoader.map_image_index[getFullImageSrc(this.LastDrawingUrl)];
if (_img != undefined && _img.Image != null || _img.Status == ImageLoadStatus.Loading)
{
var _x = 0;
......
......@@ -376,8 +376,8 @@ DrawingObjectsController.prototype =
shape_props.ShapeProperties = new asc_CShapeProperty();
shape_props.ShapeProperties.type = c_obj.getPresetGeom();
shape_props.ShapeProperties.fill = CreateAscFillEx(c_obj.getFill());
shape_props.ShapeProperties.stroke = CreateAscStrokeEx(c_obj.getStroke());
shape_props.ShapeProperties.fill = c_obj.getFill();
shape_props.ShapeProperties.stroke = c_obj.getStroke();
shape_props.ShapeProperties.canChangeArrows = c_obj.canChangeArrows();
//shape_props.verticalTextAlign = c_obj.bodyPr.anchor;
......@@ -496,8 +496,10 @@ DrawingObjectsController.prototype =
var pr = shape_props.ShapeProperties;
if (pr.fill != null && pr.fill.fill != null && pr.fill.fill.type == FILL_TYPE_BLIP)
{
this.drawingDocument.DrawImageTextureFillShape(pr.fill.fill.RasterImageId);
this.drawingObjects.drawingDocument.DrawImageTextureFillShape(pr.fill.fill.RasterImageId);
}
shape_props.ShapeProperties.fill = CreateAscFillEx(c_obj.getFill());
shape_props.ShapeProperties.stroke = CreateAscStrokeEx(c_obj.getStroke());
//shape_props.ShapeProperties = CreateAscShapePropFromProp(shape_props.ShapeProperties); // уже не надо, т.к. это asc_класс
}
......@@ -651,6 +653,7 @@ DrawingObjectsController.prototype =
}
this.drawingObjects.showDrawingObjects(true);
this.drawingObjects.selectGraphicObject();
this.drawingObjects.sendSelectionChanged();
}
};
......
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