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
49fd6252
Commit
49fd6252
authored
Jun 20, 2017
by
Oleg Korshul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
notes. start developing
parent
6fb2b455
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
64 deletions
+55
-64
slide/Drawing/DrawingDocument.js
slide/Drawing/DrawingDocument.js
+8
-8
slide/Drawing/HtmlPage.js
slide/Drawing/HtmlPage.js
+41
-45
slide/api.js
slide/api.js
+6
-11
No files found.
slide/Drawing/DrawingDocument.js
View file @
49fd6252
...
...
@@ -1610,8 +1610,8 @@ function CDrawingDocument()
this
.
ConvertCoordsFromCursor2
=
function
(
x
,
y
)
{
var
_word_control
=
this
.
m_oWordControl
;
var
_x
=
x
-
_word_control
.
X
-
(
_word_control
.
m_oMain
Cont
ent
.
AbsolutePosition
.
L
+
_word_control
.
m_oMainView
.
AbsolutePosition
.
L
)
*
g_dKoef_mm_to_pix
;
var
_y
=
y
-
_word_control
.
Y
-
(
_word_control
.
m_oMain
Cont
ent
.
AbsolutePosition
.
T
+
_word_control
.
m_oMainView
.
AbsolutePosition
.
T
)
*
g_dKoef_mm_to_pix
;
var
_x
=
x
-
_word_control
.
X
-
(
_word_control
.
m_oMain
Par
ent
.
AbsolutePosition
.
L
+
_word_control
.
m_oMainView
.
AbsolutePosition
.
L
)
*
g_dKoef_mm_to_pix
;
var
_y
=
y
-
_word_control
.
Y
-
(
_word_control
.
m_oMain
Par
ent
.
AbsolutePosition
.
T
+
_word_control
.
m_oMainView
.
AbsolutePosition
.
T
)
*
g_dKoef_mm_to_pix
;
var
dKoef
=
(
100
*
g_dKoef_pix_to_mm
/
this
.
m_oWordControl
.
m_nZoomValue
);
...
...
@@ -1669,8 +1669,8 @@ function CDrawingDocument()
__y
=
transform
.
TransformPointY
(
x
,
y
);
}
var
x_pix
=
(
this
.
SlideCurrectRect
.
left
+
__x
*
dKoef
+
(
_word_control
.
m_oMain
Cont
ent
.
AbsolutePosition
.
L
+
_word_control
.
m_oMainView
.
AbsolutePosition
.
L
)
*
g_dKoef_mm_to_pix
)
>>
0
;
var
y_pix
=
(
this
.
SlideCurrectRect
.
top
+
__y
*
dKoef
+
(
_word_control
.
m_oMain
Cont
ent
.
AbsolutePosition
.
T
+
_word_control
.
m_oMainView
.
AbsolutePosition
.
T
)
*
g_dKoef_mm_to_pix
)
>>
0
;
var
x_pix
=
(
this
.
SlideCurrectRect
.
left
+
__x
*
dKoef
+
(
_word_control
.
m_oMain
Par
ent
.
AbsolutePosition
.
L
+
_word_control
.
m_oMainView
.
AbsolutePosition
.
L
)
*
g_dKoef_mm_to_pix
)
>>
0
;
var
y_pix
=
(
this
.
SlideCurrectRect
.
top
+
__y
*
dKoef
+
(
_word_control
.
m_oMain
Par
ent
.
AbsolutePosition
.
T
+
_word_control
.
m_oMainView
.
AbsolutePosition
.
T
)
*
g_dKoef_mm_to_pix
)
>>
0
;
return
{
X
:
x_pix
,
Y
:
y_pix
,
Error
:
false
};
}
...
...
@@ -1686,8 +1686,8 @@ function CDrawingDocument()
_x
=
this
.
m_oWordControl
.
X
;
_y
=
this
.
m_oWordControl
.
Y
;
_x
+=
(
this
.
m_oWordControl
.
m_oMain
Cont
ent
.
AbsolutePosition
.
L
+
this
.
m_oWordControl
.
m_oMainView
.
AbsolutePosition
.
L
)
*
g_dKoef_mm_to_pix
;
_y
+=
(
this
.
m_oWordControl
.
m_oMain
Cont
ent
.
AbsolutePosition
.
T
+
this
.
m_oWordControl
.
m_oMainView
.
AbsolutePosition
.
T
)
*
g_dKoef_mm_to_pix
;
_x
+=
(
this
.
m_oWordControl
.
m_oMain
Par
ent
.
AbsolutePosition
.
L
+
this
.
m_oWordControl
.
m_oMainView
.
AbsolutePosition
.
L
)
*
g_dKoef_mm_to_pix
;
_y
+=
(
this
.
m_oWordControl
.
m_oMain
Par
ent
.
AbsolutePosition
.
T
+
this
.
m_oWordControl
.
m_oMainView
.
AbsolutePosition
.
T
)
*
g_dKoef_mm_to_pix
;
}
var
x_pix
=
(
this
.
SlideCurrectRect
.
left
+
x
*
dKoef
+
_x
)
>>
0
;
...
...
@@ -1701,8 +1701,8 @@ function CDrawingDocument()
var
_word_control
=
this
.
m_oWordControl
;
var
dKoef
=
(
this
.
m_oWordControl
.
m_nZoomValue
*
g_dKoef_mm_to_pix
/
100
);
var
x_pix
=
(
this
.
SlideCurrectRect
.
left
+
x
*
dKoef
+
_word_control
.
m_oMain
Cont
ent
.
AbsolutePosition
.
L
*
g_dKoef_mm_to_pix
)
>>
0
;
var
y_pix
=
(
this
.
SlideCurrectRect
.
top
+
y
*
dKoef
+
_word_control
.
m_oMain
Cont
ent
.
AbsolutePosition
.
T
*
g_dKoef_mm_to_pix
)
>>
0
;
var
x_pix
=
(
this
.
SlideCurrectRect
.
left
+
x
*
dKoef
+
_word_control
.
m_oMain
Par
ent
.
AbsolutePosition
.
L
*
g_dKoef_mm_to_pix
)
>>
0
;
var
y_pix
=
(
this
.
SlideCurrectRect
.
top
+
y
*
dKoef
+
_word_control
.
m_oMain
Par
ent
.
AbsolutePosition
.
T
*
g_dKoef_mm_to_pix
)
>>
0
;
x_pix
+=
_word_control
.
X
;
y_pix
+=
_word_control
.
Y
;
...
...
slide/Drawing/HtmlPage.js
View file @
49fd6252
...
...
@@ -144,6 +144,7 @@ function CEditorPage(api)
this
.
m_oNotes_scroll
=
null
;
// main
this
.
m_oMainParent
=
null
;
this
.
m_oMainContent
=
null
;
// <-
// horizontal scroll
...
...
@@ -376,12 +377,12 @@ function CEditorPage(api)
this
.
m_oBody
=
CreateControlContainer
(
this
.
Name
);
this
.
Splitter1Pos
=
70
;
this
.
Splitter2Pos
=
(
this
.
IsSupportNotes
===
true
)
?
2
0
:
0
;
this
.
Splitter2Pos
=
(
this
.
IsSupportNotes
===
true
)
?
1
0
:
0
;
this
.
OldSplitter1Pos
=
this
.
Splitter1Pos
;
this
.
Splitter1PosMin
=
20
;
this
.
Splitter1PosMax
=
80
;
this
.
Splitter2PosMin
=
2
0
;
this
.
Splitter2PosMin
=
1
0
;
this
.
Splitter2PosMax
=
100
;
var
ScrollWidthMm
=
this
.
ScrollWidthPx
*
g_dKoef_pix_to_mm
;
...
...
@@ -417,15 +418,15 @@ function CEditorPage(api)
}
// main content -------------------------------------------------------------
this
.
m_oMainContent
=
CreateControlContainer
(
"
id_main
"
);
this
.
m_oMainParent
=
CreateControlContainer
(
"
id_main_parent
"
);
this
.
m_oMainParent
.
Bounds
.
SetParams
(
this
.
Splitter1Pos
+
GlobalSkin
.
SplitterWidthMM
,
0
,
g_dKoef_pix_to_mm
,
1000
,
true
,
false
,
true
,
false
,
-
1
,
-
1
);
this
.
m_oBody
.
AddControl
(
this
.
m_oMainParent
);
if
(
GlobalSkin
.
SupportNotes
)
this
.
m_oMainContent
.
Bounds
.
SetParams
(
this
.
Splitter1Pos
+
GlobalSkin
.
SplitterWidthMM
,
0
,
g_dKoef_pix_to_mm
,
this
.
Splitter2Pos
+
GlobalSkin
.
SplitterWidthMM
,
true
,
false
,
true
,
true
,
-
1
,
-
1
);
else
this
.
m_oMainContent
.
Bounds
.
SetParams
(
this
.
Splitter1Pos
+
GlobalSkin
.
SplitterWidthMM
,
0
,
g_dKoef_pix_to_mm
,
1000
,
true
,
false
,
true
,
false
,
-
1
,
-
1
);
this
.
m_oMainContent
=
CreateControlContainer
(
"
id_main
"
);
this
.
m_oMainContent
.
Bounds
.
SetParams
(
0
,
0
,
g_dKoef_pix_to_mm
,
this
.
Splitter2Pos
+
GlobalSkin
.
SplitterWidthMM
,
true
,
false
,
true
,
true
,
-
1
,
-
1
);
this
.
m_oMainContent
.
Anchor
=
(
g_anchor_left
|
g_anchor_top
|
g_anchor_right
|
g_anchor_bottom
);
this
.
m_o
Body
.
AddControl
(
this
.
m_oMainContent
);
this
.
m_o
MainParent
.
AddControl
(
this
.
m_oMainContent
);
// panel right --------------------------------------------------------------
this
.
m_oPanelRight
=
CreateControlContainer
(
"
id_panel_right
"
);
...
...
@@ -508,9 +509,9 @@ function CEditorPage(api)
// notes ----
this
.
m_oNotesContainer
=
CreateControlContainer
(
"
id_panel_notes
"
);
this
.
m_oNotesContainer
.
Bounds
.
SetParams
(
this
.
Splitter1Pos
+
GlobalSkin
.
SplitterWidthMM
,
0
,
g_dKoef_pix_to_mm
,
1000
,
true
,
true
,
true
,
false
,
-
1
,
this
.
Splitter2Pos
);
this
.
m_oNotesContainer
.
Bounds
.
SetParams
(
0
,
0
,
g_dKoef_pix_to_mm
,
1000
,
true
,
true
,
true
,
false
,
-
1
,
this
.
Splitter2Pos
);
this
.
m_oNotesContainer
.
Anchor
=
(
g_anchor_left
|
g_anchor_right
|
g_anchor_bottom
);
this
.
m_o
Body
.
AddControl
(
this
.
m_oNotesContainer
);
this
.
m_o
MainParent
.
AddControl
(
this
.
m_oNotesContainer
);
this
.
m_oNotes
=
CreateControl
(
"
id_notes
"
);
this
.
m_oNotes
.
Bounds
.
SetParams
(
0
,
0
,
ScrollWidthMm
,
1000
,
false
,
false
,
true
,
false
,
-
1
,
-
1
);
...
...
@@ -559,7 +560,8 @@ function CEditorPage(api)
if
(
this
.
IsSupportNotes
)
{
this
.
m_oNotes
.
HtmlElement
.
style
.
backgroundColor
=
GlobalSkin
.
BackgroundColor
;
this
.
m_oNotes
.
HtmlElement
.
style
.
borderBottom
=
(
"
1px solid
"
+
GlobalSkin
.
BorderSplitterColor
);
this
.
m_oNotesContainer
.
HtmlElement
.
style
.
backgroundColor
=
GlobalSkin
.
BackgroundColor
;
this
.
m_oNotesContainer
.
HtmlElement
.
style
.
borderTop
=
(
"
1px solid
"
+
GlobalSkin
.
BorderSplitterColor
);
}
this
.
m_oOverlayApi
.
m_oControl
=
this
.
m_oOverlay
;
...
...
@@ -693,6 +695,10 @@ function CEditorPage(api)
if
(
!
this
.
m_oApi
.
isMobileVersion
)
{
this
.
m_oMainParent
.
HtmlElement
.
onmousemove
=
this
.
onBodyMouseMove
;
this
.
m_oMainParent
.
HtmlElement
.
onmousedown
=
this
.
onBodyMouseDown
;
this
.
m_oMainParent
.
HtmlElement
.
onmouseup
=
this
.
onBodyMouseUp
;
this
.
m_oBody
.
HtmlElement
.
onmousemove
=
this
.
onBodyMouseMove
;
this
.
m_oBody
.
HtmlElement
.
onmousedown
=
this
.
onBodyMouseDown
;
this
.
m_oBody
.
HtmlElement
.
onmouseup
=
this
.
onBodyMouseUp
;
...
...
@@ -1466,12 +1472,7 @@ function CEditorPage(api)
}
if
(
_isCatch
)
{
if
(
e
.
preventDefault
)
e
.
preventDefault
();
else
e
.
returnValue
=
false
;
}
AscCommon
.
stopEvent
(
e
);
};
this
.
onBodyMouseMove
=
function
(
e
)
...
...
@@ -1547,12 +1548,7 @@ function CEditorPage(api)
}
if
(
_isCatch
)
{
if
(
e
.
preventDefault
)
e
.
preventDefault
();
else
e
.
returnValue
=
false
;
}
AscCommon
.
stopEvent
(
e
);
};
this
.
OnResizeSplitter
=
function
()
...
...
@@ -1564,39 +1560,49 @@ function CEditorPage(api)
if
(
!
this
.
IsSupportNotes
)
this
.
Splitter2Pos
=
0
;
else
if
(
this
.
Splitter2Pos
<
1
)
this
.
Splitter2Pos
=
1
;
if
(
this
.
IsUseNullThumbnailsSplitter
||
(
0
!=
this
.
Splitter1Pos
))
{
this
.
m_oMain
Cont
ent
.
Bounds
.
L
=
this
.
Splitter1Pos
+
GlobalSkin
.
SplitterWidthMM
;
this
.
m_oMain
Par
ent
.
Bounds
.
L
=
this
.
Splitter1Pos
+
GlobalSkin
.
SplitterWidthMM
;
this
.
m_oMainContent
.
Bounds
.
B
=
GlobalSkin
.
SupportNotes
?
this
.
Splitter2Pos
+
GlobalSkin
.
SplitterWidthMM
:
1000
;
this
.
m_oMainContent
.
Bounds
.
isAbsB
=
GlobalSkin
.
SupportNotes
;
this
.
m_oNotesContainer
.
Bounds
.
L
=
this
.
Splitter1Pos
+
GlobalSkin
.
SplitterWidthMM
;
this
.
m_oNotesContainer
.
Bounds
.
AbsH
=
this
.
Splitter2Pos
;
this
.
m_oThumbnailsContainer
.
HtmlElement
.
style
.
display
=
"
block
"
;
this
.
m_oMainContent
.
HtmlElement
.
style
.
borderLeft
=
"
1px
"
+
GlobalSkin
.
BorderSplitterColor
+
"
solid
"
;
this
.
m_oMainParent
.
HtmlElement
.
style
.
borderLeft
=
(
"
1px solid
"
+
GlobalSkin
.
BorderSplitterColor
);
}
else
{
this
.
m_oMain
Cont
ent
.
Bounds
.
L
=
0
;
this
.
m_oMain
Par
ent
.
Bounds
.
L
=
0
;
this
.
m_oMainContent
.
Bounds
.
B
=
GlobalSkin
.
SupportNotes
?
this
.
Splitter2Pos
+
GlobalSkin
.
SplitterWidthMM
:
1000
;
this
.
m_oMainContent
.
Bounds
.
isAbsB
=
GlobalSkin
.
SupportNotes
;
this
.
m_oNotesContainer
.
Bounds
.
L
=
0
;
this
.
m_oNotesContainer
.
Bounds
.
AbsH
=
this
.
Splitter2Pos
;
this
.
m_oThumbnailsContainer
.
HtmlElement
.
style
.
display
=
"
none
"
;
this
.
m_oMainParent
.
HtmlElement
.
style
.
borderLeft
=
"
none
"
;
}
this
.
m_oMainContent
.
HtmlElement
.
style
.
borderLeft
=
"
1px
"
+
GlobalSkin
.
BorderSplitterColor
+
"
none
"
;
if
(
this
.
IsSupportNotes
)
{
if
(
this
.
m_oNotesContainer
.
Bounds
.
AbsH
<
1
)
this
.
m_oNotesContainer
.
Bounds
.
AbsH
=
1
;
}
if
(
this
.
Splitter2Pos
<
1
)
this
.
m_oNotesContainer
.
HtmlElement
.
style
.
display
=
"
none
"
;
if
(
this
.
Splitter2Pos
<=
1
)
{
this
.
m_oNotes
.
HtmlElement
.
style
.
display
=
"
none
"
;
this
.
m_oNotes_scroll
.
HtmlElement
.
style
.
display
=
"
none
"
;
}
else
this
.
m_oNotesContainer
.
HtmlElement
.
style
.
display
=
"
block
"
;
{
this
.
m_oNotes
.
HtmlElement
.
style
.
display
=
"
block
"
;
this
.
m_oNotes_scroll
.
HtmlElement
.
style
.
display
=
"
block
"
;
}
this
.
OnResize2
(
true
);
};
...
...
@@ -1646,12 +1652,7 @@ function CEditorPage(api)
}
if
(
_isCatch
)
{
if
(
e
.
preventDefault
)
e
.
preventDefault
();
else
e
.
returnValue
=
false
;
}
AscCommon
.
stopEvent
(
e
);
};
this
.
onMouseDown
=
function
(
e
)
...
...
@@ -1883,11 +1884,6 @@ function CEditorPage(api)
this
.
IsSupportNotes
=
bEnabled
;
this
.
Splitter2Pos
=
0
;
if
(
bEnabled
)
this
.
m_oMainContent
.
HtmlElement
.
style
.
borderBottom
=
(
"
1px solid
"
+
GlobalSkin
.
BorderSplitterColor
);
else
this
.
m_oMainContent
.
HtmlElement
.
style
.
borderBottom
=
"
none
"
;
this
.
OnResizeSplitter
();
};
...
...
slide/api.js
View file @
49fd6252
...
...
@@ -1316,22 +1316,15 @@ background-repeat: no-repeat;\
{
this
.
CreateCSS
();
var
_main_border_style
=
"
border-bottom-width: 1px;border-bottom-color:
"
+
AscCommonSlide
.
GlobalSkin
.
BorderSplitterColor
+
"
; border-bottom-style: solid;
"
;
var
_thumbnail_style_right
=
"
border-right-width: 1px;border-right-color:
"
+
AscCommonSlide
.
GlobalSkin
.
BorderSplitterColor
+
"
; border-right-style: solid;
"
;
if
(
!
AscCommonSlide
.
GlobalSkin
.
SupportNotes
)
{
_main_border_style
=
""
;
_thumbnail_style_right
=
""
;
}
var
_innerHTML
=
"
<div id=
\"
id_panel_thumbnails
\"
class=
\"
block_elem
\"
style=
\"
background-color:
"
+
AscCommonSlide
.
GlobalSkin
.
BackgroundColorThumbnails
+
"
;
"
+
_thumbnail_style_right
+
"
\"
>
\
var
_innerHTML
=
"
<div id=
\"
id_panel_thumbnails
\"
class=
\"
block_elem
\"
style=
\"
background-color:
"
+
AscCommonSlide
.
GlobalSkin
.
BackgroundColorThumbnails
+
"
;
\"
>
\
<canvas id=
\"
id_thumbnails_background
\"
class=
\"
block_elem
\"
style=
\"
-ms-touch-action: none;-webkit-user-select: none;background-color:#EBEBEB;z-index:1
\"
></canvas>
\
<canvas id=
\"
id_thumbnails
\"
class=
\"
block_elem
\"
style=
\"
-ms-touch-action: none;-webkit-user-select: none;z-index:2
\"
></canvas>
\
<div id=
\"
id_vertical_scroll_thmbnl
\"
style=
\"
left:0;top:0;width:1px;overflow:hidden;position:absolute;
\"
>
\
<div id=
\"
panel_right_scroll_thmbnl
\"
class=
\"
block_elem
\"
style=
\"
left:0;top:0;width:1px;height:6000px;
\"
></div>
\
</div>
\
</div>
\
<div id=
\"
id_main
\"
class=
\"
block_elem
\"
style=
\"
-ms-touch-action: none;-moz-user-select:none;-khtml-user-select:none;user-select:none;background-color:
"
+
AscCommonSlide
.
GlobalSkin
.
BackgroundColor
+
"
;overflow:hidden;border-left-width: 1px;border-left-color:
"
+
AscCommonSlide
.
GlobalSkin
.
BorderSplitterColor
+
"
; border-left-style: solid;
"
+
_main_border_style
+
"
\"
UNSELECTABLE=
\"
on
\"
>
\
<div id=
\"
id_main_parent
\"
class=
\"
block_elem
\"
style=
\"
-ms-touch-action: none;-moz-user-select:none;-khtml-user-select:none;user-select:none;overflow:hidden;border-left-width: 1px;border-left-color:
"
+
AscCommonSlide
.
GlobalSkin
.
BorderSplitterColor
+
"
; border-left-style: solid;
\"
UNSELECTABLE=
\"
on
\"
>
\
<div id=
\"
id_main
\"
class=
\"
block_elem
\"
style=
\"
-ms-touch-action: none;-moz-user-select:none;-khtml-user-select:none;user-select:none;background-color:
"
+
AscCommonSlide
.
GlobalSkin
.
BackgroundColor
+
"
;overflow:hidden;
\"
UNSELECTABLE=
\"
on
\"
>
\
<div id=
\"
id_panel_left
\"
class=
\"
block_elem
\"
>
\
<canvas id=
\"
id_buttonTabs
\"
class=
\"
block_elem
\"
></canvas>
\
<canvas id=
\"
id_vert_ruler
\"
class=
\"
block_elem
\"
></canvas>
\
...
...
@@ -1361,11 +1354,12 @@ background-repeat: no-repeat;\
if
(
true
)
{
_innerHTML
+=
"
<div id=
\"
id_panel_notes
\"
class=
\"
block_elem
\"
style=
\"
background-color:#FFFFFF;
border-left-width: 1px;border-left-color:
"
+
AscCommonSlide
.
GlobalSkin
.
BorderSplitterColor
+
"
; border-left-style: solid;border-top-width: 1px;border-top-color:
"
+
AscCommonSlide
.
GlobalSkin
.
BorderSplitterColor
+
"
; border-top-style: solid;
\"
>
\
_innerHTML
+=
"
<div id=
\"
id_panel_notes
\"
class=
\"
block_elem
\"
style=
\"
background-color:#FFFFFF;
\"
>
\
<canvas id=
\"
id_notes
\"
class=
\"
block_elem
\"
style=
\"
background-color:#FFFFFF;z-index:1
\"
></canvas>
\
<div id=
\"
id_vertical_scroll_notes
\"
style=
\"
left:0;top:0;width:16px;overflow:hidden;position:absolute;
\"
>
\
<div id=
\"
panel_right_scroll_notes
\"
class=
\"
block_elem
\"
style=
\"
left:0;top:0;width:16px;height:6000px;
\"
></div>
\
</div>
\
</div>
\
</div>
"
;
}
...
...
@@ -5545,6 +5539,7 @@ background-repeat: no-repeat;\
return
;
}
this
.
WordControl
.
setNodesEnable
((
this
.
isViewMode
||
this
.
isMobileVersion
)
?
false
:
true
);
if
(
isViewMode
)
{
this
.
ShowParaMarks
=
false
;
...
...
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