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

Add getGraphicObjectMetrics

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47996 954022d7-b5bf-4e40-9824-e11837661b57
parent 76d3ff5f
......@@ -2161,6 +2161,15 @@ function DrawingObjects() {
return _this.drawingDocument.CanvasHitContext;
}
// GraphicObject: x, y, extX, extY
_t.getGraphicObjectMetrics = function() {
return { x: pxToMm(_t.getRealLeftOffset()),
y: pxToMm(_t.getRealTopOffset()),
extX: pxToMm(_t.getWidthFromTo()),
extY: pxToMm(_t.getHeightFromTo()) };
}
// Считаем From/To исходя из graphicObject
_t.setGraphicObjectCoords = function() {
if ( _t.isGraphicObject() ) {
......@@ -4207,6 +4216,9 @@ function DrawingObjects() {
return selArray;
}
_this.getSelectedObjectsStack = function() {
}
//-----------------------------------------------------------------------------------
// Graphic object mouse events
//-----------------------------------------------------------------------------------
......@@ -4961,7 +4973,7 @@ function DrawingObjects() {
return null;
var index = _this.inSelectionDrawingObjectIndex(x, y, true);
var objectInfo = { cursor: null, data: null, isShape: false };
var objectInfo = { cursor: null, data: null, isGraphicObject: false };
var asc = window["Asc"];
var graphicObjectInfo = _this.controller.isPointInDrawingObjects( pxToMm(x - scrollOffset.x), pxToMm(y - scrollOffset.y) );
......@@ -4969,7 +4981,7 @@ function DrawingObjects() {
if ( graphicObjectInfo ) {
objectInfo.data = graphicObjectInfo.objectId;
objectInfo.cursor = graphicObjectInfo.cursorType;
objectInfo.isShape = true;
objectInfo.isGraphicObject = true;
return objectInfo;
}
......
......@@ -1077,7 +1077,7 @@
// Shapes
var graphicsInfo = t.handlers.trigger("getGraphicsInfo", coord.x, coord.y);
if ( graphicsInfo && graphicsInfo.isShape ) {
if ( graphicsInfo && graphicsInfo.isGraphicObject ) {
asc["editor"].isStartAddShape = true;
t.isFocusDrawingObject = true;
t.isSelectDrawingObject = true;
......@@ -1362,7 +1362,7 @@
// shapes
var graphicsInfo = t.handlers.trigger("getGraphicsInfo", coord.x, coord.y);
if ( graphicsInfo && graphicsInfo.isShape )
if ( graphicsInfo && graphicsInfo.isGraphicObject )
asc["editor"].isStartAddShape = true;
if ( asc["editor"].isStartAddShape ) {
......
......@@ -5936,7 +5936,7 @@
var drawingInfo = this.objectRender.checkCursorDrawingObject(x, y);
if ( drawingInfo ) {
if ( drawingInfo.isShape )
if ( drawingInfo.isGraphicObject )
asc["editor"].isStartAddShape = true;
else
asc["editor"].isStartAddShape = false;
......
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