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
d2476b49
Commit
d2476b49
authored
Apr 27, 2017
by
Oleg Korshul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
eafb0853
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
5 deletions
+73
-5
word/Drawing/DrawingDocument.js
word/Drawing/DrawingDocument.js
+67
-5
word/Drawing/HtmlPage.js
word/Drawing/HtmlPage.js
+6
-0
No files found.
word/Drawing/DrawingDocument.js
View file @
d2476b49
...
...
@@ -3764,6 +3764,57 @@ function CDrawingDocument()
}
};
this
.
ContentControlsSaveLast
=
function
()
{
this
.
ContentControlObjectsLast
=
[];
for
(
var
i
=
0
;
i
<
this
.
ContentControlObjects
.
length
;
i
++
)
{
var
_obj
=
this
.
ContentControlObjects
[
i
];
this
.
ContentControlObjectsLast
.
push
(
new
CContentControlTrack
(
_obj
.
id
,
_obj
.
type
,
_obj
.
rects
));
}
};
this
.
ContentControlsCheckLast
=
function
()
{
var
_len1
=
this
.
ContentControlObjects
.
length
;
var
_len2
=
this
.
ContentControlObjectsLast
.
length
;
if
(
_len1
!=
_len2
)
return
true
;
var
count1
,
count2
;
for
(
var
i
=
0
;
i
<
_len1
;
i
++
)
{
var
_obj1
=
this
.
ContentControlObjects
[
i
];
var
_obj2
=
this
.
ContentControlObjectsLast
[
i
];
if
(
_obj1
.
id
!=
_obj2
.
id
)
return
true
;
if
(
_obj1
.
type
!=
_obj2
.
type
)
return
true
;
count1
=
_obj1
.
rects
.
length
;
count2
=
_obj2
.
rects
.
length
;
if
(
count1
!=
count2
)
return
true
;
for
(
var
j
=
0
;
j
<
count1
;
j
++
)
{
if
(
Math
.
abs
(
_obj1
.
rects
[
j
].
X
-
_obj2
.
rects
[
j
].
X
)
>
0.00001
||
Math
.
abs
(
_obj1
.
rects
[
j
].
Y
-
_obj2
.
rects
[
j
].
Y
)
>
0.00001
||
Math
.
abs
(
_obj1
.
rects
[
j
].
R
-
_obj2
.
rects
[
j
].
R
)
>
0.00001
||
Math
.
abs
(
_obj1
.
rects
[
j
].
B
-
_obj2
.
rects
[
j
].
B
)
>
0.00001
||
_obj1
.
rects
[
j
].
Page
!=
_obj2
.
rects
[
j
].
Page
)
{
return
true
;
}
}
}
return
false
;
};
this
.
DrawContentControlsTrack
=
function
(
overlay
)
{
var
ctx
=
overlay
.
m_oContext
;
...
...
@@ -3896,11 +3947,8 @@ function CDrawingDocument()
ctx
.
beginPath
();
}
}
};
this
.
DrawContentControlClear
=
function
(
id
,
type
,
rects
)
{
this
.
ContentControlObjects
=
[];
this
.
ContentControlsSaveLast
();
};
this
.
OnDrawContentControl
=
function
(
id
,
type
,
rects
)
...
...
@@ -3918,7 +3966,21 @@ function CDrawingDocument()
if
(
null
==
id
||
!
rects
||
rects
.
length
==
0
)
return
;
this
.
ContentControlObjects
.
push
(
new
CContentControlTrack
(
id
,
type
,
rects
));
if
(
type
==
c_oContentControlTrack
.
In
)
{
if
(
this
.
ContentControlObjects
.
length
!=
0
&&
this
.
ContentControlObjects
[
0
].
id
==
id
)
{
this
.
ContentControlObjects
.
splice
(
0
,
1
);
}
this
.
ContentControlObjects
.
push
(
new
CContentControlTrack
(
id
,
type
,
rects
));
}
else
{
if
(
this
.
ContentControlObjects
.
length
!=
0
&&
this
.
ContentControlObjects
[
0
].
id
==
id
)
return
;
this
.
ContentControlObjects
.
unshift
(
new
CContentControlTrack
(
id
,
type
,
rects
));
}
};
this
.
private_DrawMathTrack
=
function
(
overlay
,
oPath
,
shift
,
color
,
dKoefX
,
dKoefY
,
drPage
)
...
...
word/Drawing/HtmlPage.js
View file @
d2476b49
...
...
@@ -1674,6 +1674,12 @@ function CEditorPage(api)
oWordControl
.
OnUpdateOverlay
();
}
if
(
!
oWordControl
.
IsUpdateOverlayOnEndCheck
)
{
if
(
oWordControl
.
m_oDrawingDocument
.
ContentControlsCheckLast
())
oWordControl
.
OnUpdateOverlay
();
}
oWordControl
.
EndUpdateOverlay
();
};
this
.
onMouseMove2
=
function
()
...
...
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