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
a0872ad6
Commit
a0872ad6
authored
Apr 14, 2017
by
SergeyLuzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
notes
parent
0474e94b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
64 additions
and
11 deletions
+64
-11
common/Drawings/Format/Shape.js
common/Drawings/Format/Shape.js
+1
-1
slide/Editor/Format/Notes.js
slide/Editor/Format/Notes.js
+10
-4
slide/Editor/Format/Presentation.js
slide/Editor/Format/Presentation.js
+25
-0
slide/Editor/Format/ShapePrototype.js
slide/Editor/Format/ShapePrototype.js
+0
-1
slide/Editor/Format/Slide.js
slide/Editor/Format/Slide.js
+28
-5
No files found.
common/Drawings/Format/Shape.js
View file @
a0872ad6
...
...
@@ -2691,7 +2691,7 @@ CShape.prototype.recalculateLocalTransform = function(transform)
&&
AscCommonSlide
.
CNotes
&&
this
.
parent
&&
this
.
parent
instanceof
AscCommonSlide
.
CNotes
){
bNotesShape
=
true
;
this
.
x
=
0
;
this
.
y
=
0
;
this
.
y
=
editor
.
WordControl
.
m_oLogicDocument
.
Height
;
this
.
extX
=
this
.
parent
.
getWidth
();
this
.
extY
=
2000
;
this
.
rot
=
0
;
...
...
slide/Editor/Format/Notes.js
View file @
a0872ad6
...
...
@@ -59,6 +59,9 @@
this
.
kind
=
AscFormat
.
TYPE_KIND
.
NOTES
;
this
.
Id
=
AscCommon
.
g_oIdCounter
.
Get_NewId
();
AscCommon
.
g_oTableId
.
Add
(
this
,
this
.
Id
);
this
.
graphicObjects
=
new
AscFormat
.
DrawingObjectsController
(
this
);
}
CNotes
.
prototype
.
getObjectType
=
function
(){
...
...
@@ -135,21 +138,23 @@
return
GetNotesWidth
();
};
CNotes
.
prototype
.
recalculat
e
=
function
(){
CNotes
.
prototype
.
getBodyShap
e
=
function
(){
var
aSpTree
=
this
.
cSld
.
spTree
;
for
(
var
i
=
0
;
i
<
aSpTree
.
length
;
++
i
){
var
sp
=
aSpTree
[
i
];
if
(
sp
.
isPlaceholder
()){
if
(
sp
.
getPlaceholderType
()
===
AscFormat
.
phType_body
){
sp
.
recalculate
();
return
;
return
sp
;
}
}
}
return
null
;
};
CNotes
.
prototype
.
recalculate
=
function
(){
};
CNotes
.
prototype
.
draw
=
function
(
graphics
){
return
;
var
aSpTree
=
this
.
cSld
.
spTree
;
for
(
var
i
=
0
;
i
<
aSpTree
.
length
;
++
i
){
var
sp
=
aSpTree
[
i
];
...
...
@@ -165,4 +170,5 @@
window
[
'
AscCommonSlide
'
]
=
window
[
'
AscCommonSlide
'
]
||
{};
window
[
'
AscCommonSlide
'
].
CNotes
=
CNotes
;
window
[
'
AscCommonSlide
'
].
GetNotesWidth
=
GetNotesWidth
;
})();
slide/Editor/Format/Presentation.js
View file @
a0872ad6
...
...
@@ -3226,6 +3226,31 @@ CPresentation.prototype =
},
notes_OnMouseDown
:
function
(
e
,
X
,
Y
)
{
},
notes_OnMouseUp
:
function
(
e
,
X
,
Y
)
{
},
notes_OnMouseMove
:
function
(
e
,
X
,
Y
)
{
},
notes_OnKeyDown
:
function
(
e
){
},
notes_OnKeyPress
:
function
(
e
){
},
OnUpdateSize
:
function
(){
},
Get_TableStyleForPara
:
function
()
{
...
...
slide/Editor/Format/ShapePrototype.js
View file @
a0872ad6
...
...
@@ -464,7 +464,6 @@ CShape.prototype.recalculate = function ()
var
check_slide_placeholder
=
!
this
.
isPlaceholder
()
||
(
this
.
parent
&&
(
this
.
parent
.
getObjectType
()
===
AscDFH
.
historyitem_type_Slide
||
this
.
parent
.
getObjectType
()
===
AscDFH
.
historyitem_type_Notes
));
AscFormat
.
ExecuteNoHistory
(
function
(){
if
(
this
.
recalcInfo
.
recalculateBrush
)
{
this
.
recalculateBrush
();
this
.
recalcInfo
.
recalculateBrush
=
false
;
...
...
slide/Editor/Format/Slide.js
View file @
a0872ad6
...
...
@@ -200,6 +200,8 @@ function Slide(presentation, slideLayout, slideNum)
g_oTableId
.
Add
(
this
,
this
.
Id
);
this
.
notesShape
=
null
;
this
.
lastLayoutType
=
null
;
this
.
lastLayoutMatchingName
=
null
;
this
.
lastLayoutName
=
null
;
...
...
@@ -932,9 +934,7 @@ Slide.prototype =
this
.
recalculateSpTree
();
this
.
recalcInfo
.
recalculateSpTree
=
false
;
}
if
(
this
.
notes
){
this
.
notes
.
recalculate
();
}
this
.
recalculateNotesShape
();
this
.
cachedImage
=
null
;
},
...
...
@@ -1009,6 +1009,28 @@ Slide.prototype =
this
.
cSld
.
spTree
[
i
].
recalculate
();
},
recalculateNotesShape
:
function
(){
AscFormat
.
ExecuteNoHistory
(
function
(){
if
(
!
this
.
notes
){
this
.
notesShape
=
null
;
//ToDo: Create notes body shape
}
else
{
this
.
notesShape
=
this
.
notes
.
getBodyShape
();
}
if
(
this
.
notesShape
){
var
oDocContent
=
this
.
notesShape
.
getDocContent
();
if
(
oDocContent
){
this
.
notesShape
.
transformText
.
tx
=
3
;
this
.
notesShape
.
transformText
.
ty
=
3
;
this
.
notesShape
.
invertTransformText
=
AscCommon
.
global_MatrixTransformer
.
Invert
(
this
.
notesShape
.
transformText
);
var
Width
=
AscCommonSlide
.
GetNotesWidth
();
oDocContent
.
Reset
(
0
,
0
,
Width
,
2000
);
oDocContent
.
Recalculate_Page
(
0
,
true
);
}
}
},
this
,
[]);
},
draw
:
function
(
graphics
)
{
DrawBackground
(
graphics
,
this
.
backgroundFill
,
this
.
Width
,
this
.
Height
);
...
...
@@ -1032,8 +1054,9 @@ Slide.prototype =
comments
[
i
].
draw
(
graphics
);
}
}
if
(
this
.
notes
){
this
.
notes
.
draw
(
graphics
);
return
;
if
(
this
.
notesShape
){
this
.
notesShape
.
draw
(
graphics
);
}
},
...
...
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