Commit dae6e9ea authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

попадание и трек с аспектом

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@61546 954022d7-b5bf-4e40-9824-e11837661b57
parent 6fa0de94
...@@ -19,6 +19,11 @@ function hitToHandles(x, y, object) ...@@ -19,6 +19,11 @@ function hitToHandles(x, y, object)
radius *= global_mouseEvent.KoefPixToMM; radius *= global_mouseEvent.KoefPixToMM;
} }
if (undefined !== window.AscHitToHandlesEpsilon)
{
radius = window.AscHitToHandlesEpsilon;
}
// чтобы не считать корни // чтобы не считать корни
radius *= radius; radius *= radius;
......
...@@ -226,7 +226,7 @@ function ResizeTrackShapeImage(originalObject, cardDirection) ...@@ -226,7 +226,7 @@ function ResizeTrackShapeImage(originalObject, cardDirection)
var _new_used_half_height; var _new_used_half_height;
var _temp; var _temp;
if(ShiftKey === true && this.bAspect === true) if((ShiftKey === true || window.AscAlwaysSaveAspectOnResizeTrack === true) && this.bAspect === true)
{ {
var _new_aspect = this.aspect*(Math.abs(kd1/ kd2)); var _new_aspect = this.aspect*(Math.abs(kd1/ kd2));
...@@ -576,7 +576,7 @@ function ResizeTrackShapeImage(originalObject, cardDirection) ...@@ -576,7 +576,7 @@ function ResizeTrackShapeImage(originalObject, cardDirection)
var _real_height, _real_width; var _real_height, _real_width;
var _abs_height, _abs_width; var _abs_height, _abs_width;
if(ShiftKey === true && this.bAspect === true) if((ShiftKey === true || window.AscAlwaysSaveAspectOnResizeTrack === true) && this.bAspect === true)
{ {
var _new_aspect = this.aspect*(Math.abs(kd1/ kd2)); var _new_aspect = this.aspect*(Math.abs(kd1/ kd2));
...@@ -919,7 +919,7 @@ function ResizeTrackGroup(originalObject, cardDirection, parentTrack) ...@@ -919,7 +919,7 @@ function ResizeTrackGroup(originalObject, cardDirection, parentTrack)
var _new_used_half_height; var _new_used_half_height;
var _temp; var _temp;
if(ShiftKey === true && this.bAspect === true) if((ShiftKey === true || window.AscAlwaysSaveAspectOnResizeTrack === true) && this.bAspect === true)
{ {
var _new_aspect = this.aspect*(Math.abs(kd1/ kd2)); var _new_aspect = this.aspect*(Math.abs(kd1/ kd2));
...@@ -1200,7 +1200,7 @@ function ResizeTrackGroup(originalObject, cardDirection, parentTrack) ...@@ -1200,7 +1200,7 @@ function ResizeTrackGroup(originalObject, cardDirection, parentTrack)
var _real_height, _real_width; var _real_height, _real_width;
var _abs_height, _abs_width; var _abs_height, _abs_width;
if(ShiftKey === true && this.bAspect === true) if((ShiftKey === true || window.AscAlwaysSaveAspectOnResizeTrack === true) && this.bAspect === true)
{ {
var _new_aspect = this.aspect*(Math.abs(kd1/ kd2)); var _new_aspect = this.aspect*(Math.abs(kd1/ kd2));
......
...@@ -1579,9 +1579,7 @@ CDrawingDocument.prototype = ...@@ -1579,9 +1579,7 @@ CDrawingDocument.prototype =
if (this.Native["GetDeviceDPI"]) if (this.Native["GetDeviceDPI"])
{ {
// 1см // 1см
global_mouseEvent.KoefPixToMM = 10 * this.Native["GetDeviceDPI"] / g_dKoef_in_to_mm; window.AscHitToHandlesEpsilon = 10 * this.Native["GetDeviceDPI"]() / (25.4 * this.Native["DD_GetDotsPerMM"]() );
// Серега ориентируется на эту константу
global_mouseEvent.KoefPixToMM /= TRACK_CIRCLE_RADIUS;
} }
var _isDrawings = this.LogicDocument.DrawingObjects.isPointInDrawingObjects2(pos.X, pos.Y, pos.Page, true); var _isDrawings = this.LogicDocument.DrawingObjects.isPointInDrawingObjects2(pos.X, pos.Y, pos.Page, true);
......
...@@ -5296,6 +5296,7 @@ asc_docs_api.prototype["Native_Editor_Initialize_Settings"] = function(_params) ...@@ -5296,6 +5296,7 @@ asc_docs_api.prototype["Native_Editor_Initialize_Settings"] = function(_params)
case 101: case 101:
{ {
this.WordControl.m_oDrawingDocument.IsMobile = _params[_current.pos++]; this.WordControl.m_oDrawingDocument.IsMobile = _params[_current.pos++];
window.AscAlwaysSaveAspectOnResizeTrack = true;
break; break;
} }
case 255: case 255:
......
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