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
5390e3f0
Commit
5390e3f0
authored
Aug 17, 2016
by
Sergey Luzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix crash in textart
parent
39f5f461
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
24 deletions
+24
-24
common/Drawings/Format/Path.js
common/Drawings/Format/Path.js
+24
-24
No files found.
common/Drawings/Format/Path.js
View file @
5390e3f0
...
...
@@ -984,15 +984,15 @@ Path.prototype = {
isSmartLine
:
function
()
{
if
(
this
.
ArrPathCommand
Info
.
length
!=
2
)
if
(
this
.
ArrPathCommand
.
length
!=
2
)
return
false
;
if
(
this
.
ArrPathCommand
Info
[
0
].
id
==
moveTo
&&
this
.
ArrPathCommandInfo
[
1
].
id
==
lineTo
)
if
(
this
.
ArrPathCommand
[
0
].
id
==
moveTo
&&
this
.
ArrPathCommand
[
1
].
id
==
lineTo
)
{
if
(
Math
.
abs
(
this
.
ArrPathCommand
Info
[
0
].
X
-
this
.
ArrPathCommandInfo
[
1
].
X
)
<
0.0001
)
if
(
Math
.
abs
(
this
.
ArrPathCommand
[
0
].
X
-
this
.
ArrPathCommand
[
1
].
X
)
<
0.0001
)
return
true
;
if
(
Math
.
abs
(
this
.
ArrPathCommand
Info
[
0
].
Y
-
this
.
ArrPathCommandInfo
[
1
].
Y
)
<
0.0001
)
if
(
Math
.
abs
(
this
.
ArrPathCommand
[
0
].
Y
-
this
.
ArrPathCommand
[
1
].
Y
)
<
0.0001
)
return
true
;
}
...
...
@@ -1001,47 +1001,47 @@ Path.prototype = {
isSmartRect
:
function
()
{
if
(
this
.
ArrPathCommand
Info
.
length
!=
5
)
if
(
this
.
ArrPathCommand
.
length
!=
5
)
return
false
;
if
(
this
.
ArrPathCommand
Info
[
0
].
id
!=
moveTo
||
this
.
ArrPathCommand
Info
[
1
].
id
!=
lineTo
||
this
.
ArrPathCommand
Info
[
2
].
id
!=
lineTo
||
this
.
ArrPathCommand
Info
[
3
].
id
!=
lineTo
||
(
this
.
ArrPathCommand
Info
[
4
].
id
!=
lineTo
&&
this
.
ArrPathCommandInfo
[
4
].
id
!=
close
))
if
(
this
.
ArrPathCommand
[
0
].
id
!=
moveTo
||
this
.
ArrPathCommand
[
1
].
id
!=
lineTo
||
this
.
ArrPathCommand
[
2
].
id
!=
lineTo
||
this
.
ArrPathCommand
[
3
].
id
!=
lineTo
||
(
this
.
ArrPathCommand
[
4
].
id
!=
lineTo
&&
this
.
ArrPathCommand
[
4
].
id
!=
close
))
return
false
;
var
_float_eps
=
0.0001
;
if
(
Math
.
abs
(
this
.
ArrPathCommand
Info
[
0
].
X
-
this
.
ArrPathCommandInfo
[
1
].
X
)
<
_float_eps
)
if
(
Math
.
abs
(
this
.
ArrPathCommand
[
0
].
X
-
this
.
ArrPathCommand
[
1
].
X
)
<
_float_eps
)
{
if
(
Math
.
abs
(
this
.
ArrPathCommand
Info
[
1
].
Y
-
this
.
ArrPathCommandInfo
[
2
].
Y
)
<
_float_eps
)
if
(
Math
.
abs
(
this
.
ArrPathCommand
[
1
].
Y
-
this
.
ArrPathCommand
[
2
].
Y
)
<
_float_eps
)
{
if
(
Math
.
abs
(
this
.
ArrPathCommand
Info
[
2
].
X
-
this
.
ArrPathCommandInfo
[
3
].
X
)
<
_float_eps
&&
Math
.
abs
(
this
.
ArrPathCommand
Info
[
3
].
Y
-
this
.
ArrPathCommandInfo
[
0
].
Y
)
<
_float_eps
)
if
(
Math
.
abs
(
this
.
ArrPathCommand
[
2
].
X
-
this
.
ArrPathCommand
[
3
].
X
)
<
_float_eps
&&
Math
.
abs
(
this
.
ArrPathCommand
[
3
].
Y
-
this
.
ArrPathCommand
[
0
].
Y
)
<
_float_eps
)
{
if
(
this
.
ArrPathCommand
Info
[
4
].
id
==
close
)
if
(
this
.
ArrPathCommand
[
4
].
id
==
close
)
return
true
;
if
(
Math
.
abs
(
this
.
ArrPathCommand
Info
[
0
].
X
-
this
.
ArrPathCommandInfo
[
4
].
X
)
<
_float_eps
&&
Math
.
abs
(
this
.
ArrPathCommand
Info
[
0
].
Y
-
this
.
ArrPathCommandInfo
[
4
].
Y
)
<
_float_eps
)
if
(
Math
.
abs
(
this
.
ArrPathCommand
[
0
].
X
-
this
.
ArrPathCommand
[
4
].
X
)
<
_float_eps
&&
Math
.
abs
(
this
.
ArrPathCommand
[
0
].
Y
-
this
.
ArrPathCommand
[
4
].
Y
)
<
_float_eps
)
{
return
true
;
}
}
}
}
else
if
(
Math
.
abs
(
this
.
ArrPathCommand
Info
[
0
].
Y
-
this
.
ArrPathCommandInfo
[
1
].
Y
)
<
_float_eps
)
else
if
(
Math
.
abs
(
this
.
ArrPathCommand
[
0
].
Y
-
this
.
ArrPathCommand
[
1
].
Y
)
<
_float_eps
)
{
if
(
Math
.
abs
(
this
.
ArrPathCommand
Info
[
1
].
X
-
this
.
ArrPathCommandInfo
[
2
].
X
)
<
_float_eps
)
if
(
Math
.
abs
(
this
.
ArrPathCommand
[
1
].
X
-
this
.
ArrPathCommand
[
2
].
X
)
<
_float_eps
)
{
if
(
Math
.
abs
(
this
.
ArrPathCommand
Info
[
2
].
Y
-
this
.
ArrPathCommandInfo
[
3
].
Y
)
<
_float_eps
&&
Math
.
abs
(
this
.
ArrPathCommand
Info
[
3
].
X
-
this
.
ArrPathCommandInfo
[
0
].
X
)
<
_float_eps
)
if
(
Math
.
abs
(
this
.
ArrPathCommand
[
2
].
Y
-
this
.
ArrPathCommand
[
3
].
Y
)
<
_float_eps
&&
Math
.
abs
(
this
.
ArrPathCommand
[
3
].
X
-
this
.
ArrPathCommand
[
0
].
X
)
<
_float_eps
)
{
if
(
this
.
ArrPathCommand
Info
[
4
].
id
==
close
)
if
(
this
.
ArrPathCommand
[
4
].
id
==
close
)
return
true
;
if
(
Math
.
abs
(
this
.
ArrPathCommand
Info
[
0
].
X
-
this
.
ArrPathCommandInfo
[
4
].
X
)
<
_float_eps
&&
Math
.
abs
(
this
.
ArrPathCommand
Info
[
0
].
Y
-
this
.
ArrPathCommandInfo
[
4
].
Y
)
<
_float_eps
)
if
(
Math
.
abs
(
this
.
ArrPathCommand
[
0
].
X
-
this
.
ArrPathCommand
[
4
].
X
)
<
_float_eps
&&
Math
.
abs
(
this
.
ArrPathCommand
[
0
].
Y
-
this
.
ArrPathCommand
[
4
].
Y
)
<
_float_eps
)
{
return
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