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
94a45a7e
Commit
94a45a7e
authored
Jul 04, 2017
by
Oleg Korshul
Committed by
GitHub
Jul 04, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/notes' into develop
parents
2d3dd8e7
79c46949
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
9 deletions
+62
-9
slide/Drawing/HtmlPage.js
slide/Drawing/HtmlPage.js
+2
-5
slide/Editor/Format/Notes.js
slide/Editor/Format/Notes.js
+1
-1
slide/Editor/Format/Presentation.js
slide/Editor/Format/Presentation.js
+38
-0
slide/Editor/Format/Slide.js
slide/Editor/Format/Slide.js
+19
-1
slide/api.js
slide/api.js
+2
-2
No files found.
slide/Drawing/HtmlPage.js
View file @
94a45a7e
...
...
@@ -585,9 +585,8 @@ function CEditorPage(api)
this
.
initEvents
();
this
.
OnResize
(
true
);
this
.
setNodesEnable
(
false
);
//this.m_oNotesApi = new CNotesDrawer(this);
//this.m_oNotesApi.Init();
this
.
m_oNotesApi
=
new
CNotesDrawer
(
this
);
this
.
m_oNotesApi
.
Init
();
};
this
.
CheckRetinaDisplay
=
function
()
...
...
@@ -897,7 +896,6 @@ function CEditorPage(api)
if
(
_value
<
5
)
_value
=
5
;
return
_value
;
};
...
...
@@ -908,7 +906,6 @@ function CEditorPage(api)
return
;
var
_new_value
=
this
.
zoom_FitToWidth_value
();
if
(
_new_value
!=
this
.
m_nZoomValue
)
{
this
.
m_nZoomValue
=
_new_value
;
...
...
slide/Editor/Format/Notes.js
View file @
94a45a7e
...
...
@@ -44,7 +44,7 @@
//Temporary function
function
GetNotesWidth
(){
return
editor
.
WordControl
.
m_o
Notes
.
HtmlElement
.
width
/
g_dKoef_mm_to_pix
;
return
editor
.
WordControl
.
m_o
DrawingDocument
.
Notes_GetWidth
()
;
}
function
CNotes
(){
...
...
slide/Editor/Format/Presentation.js
View file @
94a45a7e
...
...
@@ -520,6 +520,8 @@ function CPresentation(DrawingDocument)
this
.
clrMru
=
[];
this
.
prnPr
=
null
;
this
.
showPr
=
null
;
this
.
NotesWidth
=
-
10
;
}
CPresentation
.
prototype
=
...
...
@@ -3948,6 +3950,9 @@ CPresentation.prototype =
{
this
.
Slides
[
oldCurPage
].
graphicObjects
.
resetSelectionState
();
}
if
(
!
this
.
Notes_OnResize
()){
this
.
DrawingDocument
.
Notes_OnRecalculate
(
this
.
CurPage
,
this
.
Slides
[
this
.
CurPage
].
NotesWidth
,
this
.
Slides
[
this
.
CurPage
].
getNotesHeight
());
}
editor
.
asc_hideComments
();
this
.
Document_UpdateInterfaceState
();
}
...
...
@@ -3962,6 +3967,39 @@ CPresentation.prototype =
{
this
.
Slides
[
this
.
CurPage
]
&&
this
.
Slides
[
this
.
CurPage
].
graphicObjects
.
resetSelection
();
},
///NOTES
Notes_OnResize
:
function
(){
if
(
!
this
.
Slides
[
this
.
CurPage
]){
return
false
;
}
var
oCurSlide
=
this
.
Slides
[
this
.
CurPage
];
var
newNotesWidth
=
this
.
DrawingDocument
.
Notes_GetWidth
();
if
(
AscFormat
.
fApproxEqual
(
oCurSlide
.
NotesWidth
,
newNotesWidth
)){
return
false
;
}
oCurSlide
.
NotesWidth
=
newNotesWidth
;
oCurSlide
.
recalculateNotesShape
();
this
.
DrawingDocument
.
Notes_OnRecalculate
(
this
.
CurPage
,
newNotesWidth
,
oCurSlide
.
getNotesHeight
());
return
true
;
},
Notes_GetHeight
:
function
(){
if
(
!
this
.
Slide
[
this
.
CurPage
]){
return
0
;
}
return
this
.
Slides
[
this
.
CurPage
].
getNotesHeight
();
},
Notes_Draw
:
function
(
SlideIndex
,
graphics
){
if
(
this
.
Slides
[
SlideIndex
]){
this
.
Slides
[
SlideIndex
].
drawNotes
(
graphics
);
}
},
//-----------------------------------------------------------------------------------
// Undo/Redo функции
//-----------------------------------------------------------------------------------
...
...
slide/Editor/Format/Slide.js
View file @
94a45a7e
...
...
@@ -206,6 +206,8 @@ function Slide(presentation, slideLayout, slideNum)
this
.
lastLayoutMatchingName
=
null
;
this
.
lastLayoutName
=
null
;
this
.
NotesWidth
=
-
10.0
;
if
(
presentation
)
{
this
.
Width
=
presentation
.
Width
;
...
...
@@ -1021,6 +1023,18 @@ Slide.prototype =
this
.
cSld
.
spTree
[
i
].
recalculate
();
},
getNotesHeight
:
function
(){
if
(
!
this
.
notesShape
){
return
0
;
}
var
oDocContent
=
this
.
notesShape
.
getDocContent
();
if
(
oDocContent
){
return
oDocContent
.
Get_SummaryHeight
();
}
return
0
;
},
recalculateNotesShape
:
function
(){
AscFormat
.
ExecuteNoHistory
(
function
(){
if
(
!
this
.
notes
){
...
...
@@ -1076,8 +1090,12 @@ Slide.prototype =
}
}
return
;
},
drawNotes
:
function
(
g
)
{
if
(
this
.
notesShape
){
this
.
notesShape
.
draw
(
g
raphics
);
this
.
notesShape
.
draw
(
g
);
}
},
...
...
slide/api.js
View file @
94a45a7e
...
...
@@ -1351,7 +1351,7 @@ background-repeat: no-repeat;\
<div id=
\"
id_buttonPrevPage
\"
class=
\"
block_elem buttonPrevPage
\"
></div>
\
<div id=
\"
id_buttonNextPage
\"
class=
\"
block_elem buttonNextPage
\"
></div>
\
</div>
\
<div id=
\"
id_horscrollpanel
\"
class=
\"
block_elem
\"
style=
\"
margin-bottom:1px;background-color:#
B0B0B0
;
\"
>
\
<div id=
\"
id_horscrollpanel
\"
class=
\"
block_elem
\"
style=
\"
margin-bottom:1px;background-color:#
F1F1F1
;
\"
>
\
<div id=
\"
id_horizontal_scroll
\"
style=
\"
left:0;top:0;height:14px;overflow:hidden;position:absolute;width:100%;
\"
>
\
<div id=
\"
panel_hor_scroll
\"
class=
\"
block_elem
\"
style=
\"
left:0;top:0;width:6000px;height:1px;
\"
></div>
\
</div>
\
...
...
@@ -5546,7 +5546,7 @@ background-repeat: no-repeat;\
return
;
}
//
this.WordControl.setNodesEnable((this.isViewMode || this.isMobileVersion) ? false : true);
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