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

for shape props

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@48055 954022d7-b5bf-4e40-9824-e11837661b57
parent e6f90719
......@@ -3039,7 +3039,7 @@ function DrawingObjects() {
worksheet.model.Drawings = aObjects;
if (drawingCtx && _this.needDrawingObjects()) {
if ( drawingCtx ) {
// всё чистим
if (clearCanvas) {
......@@ -3059,6 +3059,8 @@ function DrawingObjects() {
var index = i;
var obj = aObjects[i];
if ( !obj.canDraw() )
continue;
// Shape render
if ( obj.isGraphicObject() ) {
......@@ -3123,9 +3125,6 @@ function DrawingObjects() {
continue;
}
if ( !obj.canDraw() )
continue;
var sWidth = obj.image.width - obj.getInnerOffsetLeft();
var sHeight = obj.image.height - obj.getInnerOffsetTop();
......@@ -4112,6 +4111,13 @@ function DrawingObjects() {
}
}
_this.getGraphicObjectProps = function() {
var props = [];
var selectedObjects = _this.controller.selectedObjects;
return props;
}
_this.insertUngroupedObjects = function(idGroup, aGraphics) {
if ( idGroup && aGraphics.length ) {
......@@ -4716,17 +4722,22 @@ function DrawingObjects() {
}
return -1;
}
_this.isChartDrawingObject = function(index) {
var result = false;
_this.getGraphicSelectionType = function(index) {
if (_this.checkDrawingObjectIndex(index)) {
var obj = aObjects[index];
if (obj.isChart())
result = true;
return c_oAscSelectionType.RangeChart;
if (obj.graphicObject.isImage())
return c_oAscSelectionType.RangeImage;
if (obj.graphicObject.isShape())
return c_oAscSelectionType.RangeShape;
}
return result;
return undefined;
}
_this.getDrawingObjectByCoords = function(x, y) {
......
......@@ -2099,6 +2099,11 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
ws.objectRender.unGroupGraphicObjects();
},
asc_getGraphicObjectProps: function() {
var ws = this.wb.getWorksheet();
return ws.objectRender.getGraphicObjectProps();
},
asyncImageStartLoaded: function() {
},
......@@ -2890,6 +2895,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
prot["asc_endAddShape"] = prot.asc_endAddShape;
prot["asc_groupGraphicsObjects"] = prot.asc_groupGraphicsObjects;
prot["asc_unGroupGraphicsObjects"] = prot.asc_unGroupGraphicsObjects;
prot["asc_getGraphicObjectProps"] = prot.asc_getGraphicObjectProps;
// Cell interface
prot["asc_getCellInfo"] = prot.asc_getCellInfo;
......
......@@ -185,7 +185,8 @@ var c_oAscSelectionType = {
RangeRow: 3,
RangeMax: 4,
RangeImage: 5,
RangeChart: 6
RangeChart: 6,
RangeShape: 7
};
var c_oAscHyperlinkType = {
......
......@@ -5439,13 +5439,9 @@
ar.startRow = r;
var index = this.objectRender.inSelectionDrawingObjectIndex(xpos, ypos, true);
if (index >= 0)
{
if (this.objectRender.isChartDrawingObject(index))
ar.type = c_oAscSelectionType.RangeChart;
else
ar.type = c_oAscSelectionType.RangeImage;
}
var graphicSelectionType = this.objectRender.getGraphicSelectionType(index);
if ( (index >= 0) && graphicSelectionType )
ar.type = graphicSelectionType;
else
{
ar.type = c_oAscSelectionType.RangeCells;
......
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