Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
8a0ca7e5
Commit
8a0ca7e5
authored
Jun 08, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 32634
parent
af14103f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
11 deletions
+14
-11
common/Drawings/Format/Shape.js
common/Drawings/Format/Shape.js
+2
-2
common/Drawings/Hit.js
common/Drawings/Hit.js
+6
-6
common/Drawings/WorkEvents.js
common/Drawings/WorkEvents.js
+5
-2
common/Native/Wrappers/DrawingDocument.js
common/Native/Wrappers/DrawingDocument.js
+1
-1
No files found.
common/Drawings/Format/Shape.js
View file @
8a0ca7e5
...
...
@@ -54,9 +54,9 @@ function hitToHandles(x, y, object)
radius
*=
global_mouseEvent
.
KoefPixToMM
;
}
if
(
undefined
!==
window
.
AscHitToHandlesEpsilon
)
if
(
global_mouseEvent
&&
global_mouseEvent
.
AscHitToHandlesEpsilon
)
{
radius
=
window
.
AscHitToHandlesEpsilon
;
radius
=
global_mouseEvent
.
AscHitToHandlesEpsilon
;
}
// чтобы не считать корни
...
...
common/Drawings/Hit.js
View file @
8a0ca7e5
...
...
@@ -23,9 +23,9 @@ function HitInLine(context, px, py, x0, y0, x1, y1)
d
*=
global_mouseEvent
.
KoefPixToMM
;
}
if
(
undefined
!==
window
.
AscHitToHandlesEpsilon
)
if
(
global_mouseEvent
&&
global_mouseEvent
.
AscHitToHandlesEpsilon
)
{
d
=
window
.
AscHitToHandlesEpsilon
/
Math
.
sqrt
(
tx
*
tx
+
ty
*
ty
);
d
=
global_mouseEvent
.
AscHitToHandlesEpsilon
/
Math
.
sqrt
(
tx
*
tx
+
ty
*
ty
);
}
dx
=-
ty
*
d
;
...
...
@@ -60,9 +60,9 @@ function HitInBezier4(context, px, py, x0, y0, x1, y1, x2, y2, x3, y3)
d
*=
global_mouseEvent
.
KoefPixToMM
;
}
if
(
undefined
!==
window
.
AscHitToHandlesEpsilon
)
if
(
global_mouseEvent
&&
global_mouseEvent
.
AscHitToHandlesEpsilon
)
{
d
=
window
.
AscHitToHandlesEpsilon
/
Math
.
sqrt
(
tx
*
tx
+
ty
*
ty
);
d
=
global_mouseEvent
.
AscHitToHandlesEpsilon
/
Math
.
sqrt
(
tx
*
tx
+
ty
*
ty
);
}
dx
=-
ty
*
d
;
...
...
@@ -97,9 +97,9 @@ function HitInBezier3(context, px, py, x0, y0, x1, y1, x2, y2)
d
*=
global_mouseEvent
.
KoefPixToMM
;
}
if
(
undefined
!==
window
.
AscHitToHandlesEpsilon
)
if
(
global_mouseEvent
&&
global_mouseEvent
.
AscHitToHandlesEpsilon
)
{
d
=
window
.
AscHitToHandlesEpsilon
/
Math
.
sqrt
(
tx
*
tx
+
ty
*
ty
);
d
=
global_mouseEvent
.
AscHitToHandlesEpsilon
/
Math
.
sqrt
(
tx
*
tx
+
ty
*
ty
);
}
dx
=-
ty
*
d
;
...
...
common/Drawings/WorkEvents.js
View file @
8a0ca7e5
...
...
@@ -51,6 +51,8 @@ function CMouseEventHandler()
this
.
IsLockedEvent
=
false
;
this
.
buttonObject
=
null
;
this
.
AscHitToHandlesEpsilon
=
0
;
this
.
LockMouse
=
function
()
{
...
...
@@ -81,7 +83,7 @@ function CMouseEventHandler()
return
true
;
}
return
false
;
}
}
;
this
.
UnLockMouse
=
function
()
{
if
(
this
.
IsLocked
)
...
...
@@ -111,7 +113,7 @@ function CMouseEventHandler()
return
true
;
}
return
false
;
}
}
;
}
function
CKeyboardEvent
()
...
...
@@ -129,6 +131,7 @@ function CKeyboardEvent()
var
global_mouseEvent
=
new
CMouseEventHandler
();
var
global_keyboardEvent
=
new
CKeyboardEvent
();
AscFormat
.
AscHitToHandlesEpsilon
=
undefined
;
function
check_KeyboardEvent
(
e
)
{
...
...
common/Native/Wrappers/DrawingDocument.js
View file @
8a0ca7e5
...
...
@@ -1531,7 +1531,7 @@ CDrawingDocument.prototype =
if
(
this
.
Native
[
"
GetDeviceDPI
"
])
{
// 1см
window
.
AscHitToHandlesEpsilon
=
5
*
this
.
Native
[
"
GetDeviceDPI
"
]()
/
(
25.4
*
this
.
Native
[
"
DD_GetDotsPerMM
"
]()
);
global_mouseEvent
.
AscHitToHandlesEpsilon
=
5
*
this
.
Native
[
"
GetDeviceDPI
"
]()
/
(
25.4
*
this
.
Native
[
"
DD_GetDotsPerMM
"
]()
);
}
var
_isDrawings
=
this
.
LogicDocument
.
DrawingObjects
.
isPointInDrawingObjects2
(
pos
.
X
,
pos
.
Y
,
pos
.
Page
,
true
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment