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
0558a8f2
Commit
0558a8f2
authored
Jul 26, 2017
by
Oleg Korshul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Collaborate targets
parent
65fb8ea1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
9 deletions
+36
-9
slide/Drawing/DrawingDocument.js
slide/Drawing/DrawingDocument.js
+32
-8
slide/Drawing/HtmlPage.js
slide/Drawing/HtmlPage.js
+3
-0
slide/api.js
slide/api.js
+1
-1
No files found.
slide/Drawing/DrawingDocument.js
View file @
0558a8f2
...
...
@@ -691,7 +691,8 @@ function CDrawingCollaborativeTarget()
this
.
HtmlElementY
=
0
;
this
.
Style
=
""
;
this
.
IsInsertToDOM
=
false
;
this
.
HtmlParentId
=
-
1
;
// 0 - main, 1 - notes
this
.
HtmlParent
=
null
;
}
CDrawingCollaborativeTarget
.
prototype
=
{
...
...
@@ -732,8 +733,12 @@ CDrawingCollaborativeTarget.prototype =
var
_oldW
=
this
.
HtmlElement
.
width
;
var
_oldH
=
this
.
HtmlElement
.
height
;
var
isNotes
=
_drawing_doc
.
m_oWordControl
.
m_oLogicDocument
.
IsFocusOnNotes
();
var
_newW
=
2
;
var
_newH
=
(
this
.
Size
*
_drawing_doc
.
m_oWordControl
.
m_nZoomValue
*
g_dKoef_mm_to_pix
/
100
)
>>
0
;
if
(
isNotes
)
_newH
=
(
this
.
Size
*
g_dKoef_mm_to_pix
)
>>
0
;
if
(
null
!=
this
.
Transform
&&
!
global_MatrixTransformer
.
IsIdentity2
(
this
.
Transform
))
{
...
...
@@ -829,7 +834,15 @@ CDrawingCollaborativeTarget.prototype =
_y
+=
this
.
Transform
.
ty
;
}
var
pos
=
_drawing_doc
.
ConvertCoordsToCursor
(
_x
,
_y
);
var
pos
=
null
;
if
(
!
isNotes
)
{
pos
=
_drawing_doc
.
ConvertCoordsToCursor
(
_x
,
_y
);
}
else
{
pos
=
{
X
:
(
10
+
_x
*
g_dKoef_mm_to_pix
),
Y
:
(
_y
*
g_dKoef_mm_to_pix
-
_drawing_doc
.
m_oWordControl
.
m_oNotesApi
.
Scroll
)
};
}
this
.
HtmlElementX
=
pos
.
X
>>
0
;
this
.
HtmlElementY
=
pos
.
Y
>>
0
;
...
...
@@ -842,10 +855,19 @@ CDrawingCollaborativeTarget.prototype =
AscCommon
.
CollaborativeEditing
.
Update_ForeignCursorLabelPosition
(
this
.
Id
,
this
.
HtmlElementX
,
this
.
HtmlElementY
,
this
.
Color
);
// 3) добавить, если нужно
if
(
bIsHtmlElementCreate
)
var
HtmlParentIdNew
=
isNotes
?
1
:
0
;
if
(
this
.
HtmlParent
&&
(
HtmlParentIdNew
!=
this
.
HtmlParentId
))
{
this
.
HtmlParent
.
removeChild
(
this
.
HtmlElement
);
this
.
HtmlParent
=
null
;
this
.
HtmlParentId
=
-
1
;
}
if
(
bIsHtmlElementCreate
||
(
-
1
==
this
.
HtmlParentId
))
{
_drawing_doc
.
m_oWordControl
.
m_oMainView
.
HtmlElement
.
appendChild
(
this
.
HtmlElement
);
this
.
IsInsertToDOM
=
true
;
this
.
HtmlParent
=
(
0
==
HtmlParentIdNew
)
?
_drawing_doc
.
m_oWordControl
.
m_oMainView
.
HtmlElement
:
_drawing_doc
.
m_oWordControl
.
m_oNotesContainer
.
HtmlElement
;
this
.
HtmlParentId
=
HtmlParentIdNew
;
this
.
HtmlParent
.
appendChild
(
this
.
HtmlElement
);
}
if
(
this
.
HtmlElement
.
style
.
display
!=
"
block
"
)
...
...
@@ -856,10 +878,12 @@ CDrawingCollaborativeTarget.prototype =
Remove
:
function
(
_drawing_doc
)
{
if
(
this
.
IsInsertToDOM
)
if
(
this
.
HtmlParent
)
{
_drawing_doc
.
m_oWordControl
.
m_oMainView
.
HtmlElement
.
removeChild
(
this
.
HtmlElement
);
this
.
IsInsertToDOM
=
false
;
//_drawing_doc.m_oWordControl.m_oMainView.HtmlElement.removeChild(this.HtmlElement);
this
.
HtmlParent
.
removeChild
(
this
.
HtmlElement
);
this
.
HtmlParent
=
null
;
this
.
HtmlParentId
=
-
1
;
}
},
...
...
slide/Drawing/HtmlPage.js
View file @
0558a8f2
...
...
@@ -3613,6 +3613,9 @@ function CEditorPage(api)
oWordControl
.
Thumbnails
.
onCheckUpdate
();
}
if
(
!
isRepaint
&&
oWordControl
.
m_oNotesApi
.
IsRepaint
)
isRepaint
=
true
;
if
(
oWordControl
.
IsSupportNotes
&&
oWordControl
.
m_oNotesApi
)
oWordControl
.
m_oNotesApi
.
CheckPaint
();
...
...
slide/api.js
View file @
0558a8f2
...
...
@@ -1397,7 +1397,7 @@ background-repeat: no-repeat;\
if
(
true
)
{
_innerHTML
+=
"
<div id=
\"
id_panel_notes
\"
class=
\"
block_elem
\"
style=
\"
background-color:#FFFFFF;
\"
>
\
_innerHTML
+=
"
<div id=
\"
id_panel_notes
\"
class=
\"
block_elem
\"
style=
\"
overflow:hidden;
background-color:#FFFFFF;
\"
>
\
<canvas id=
\"
id_notes
\"
class=
\"
block_elem
\"
style=
\"
-ms-touch-action: none;-webkit-user-select: none;background-color:#FFFFFF;z-index:1
\"
></canvas>
\
<canvas id=
\"
id_notes_overlay
\"
class=
\"
block_elem
\"
style=
\"
-ms-touch-action: none;-webkit-user-select: none;z-index:2
\"
></canvas>
\
<div id=
\"
id_vertical_scroll_notes
\"
style=
\"
left:0;top:0;width:16px;overflow:hidden;position:absolute;
\"
>
\
...
...
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