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
6b61c31d
Commit
6b61c31d
authored
Jul 27, 2017
by
SergeyLuzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix Bug 35424
parent
15445d6c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
7 deletions
+42
-7
common/Drawings/Format/Shape.js
common/Drawings/Format/Shape.js
+1
-1
slide/Drawing/DrawingDocument.js
slide/Drawing/DrawingDocument.js
+2
-2
slide/Editor/Format/Presentation.js
slide/Editor/Format/Presentation.js
+19
-0
slide/Editor/Format/ShapePrototype.js
slide/Editor/Format/ShapePrototype.js
+8
-1
slide/Editor/Format/Slide.js
slide/Editor/Format/Slide.js
+12
-3
No files found.
common/Drawings/Format/Shape.js
View file @
6b61c31d
...
...
@@ -4149,7 +4149,7 @@ CShape.prototype.draw = function (graphics, transform, transformText, pageIndex)
shape_drawer
.
fromShape2
(
this
,
graphics
,
this
.
spPr
.
geometry
);
shape_drawer
.
draw
(
this
.
spPr
.
geometry
);
}
if
(
this
.
isEmptyPlaceholder
()
&&
graphics
.
IsNoDrawingEmptyPlaceholder
!==
true
)
if
(
this
.
isEmptyPlaceholder
()
&&
!
(
this
.
pen
&&
this
.
pen
.
Fill
&&
this
.
pen
.
Fill
.
fill
)
&&
graphics
.
IsNoDrawingEmptyPlaceholder
!==
true
)
{
var
drawingObjects
=
this
.
getDrawingObjectsController
();
if
(
graphics
.
m_oContext
!==
undefined
&&
graphics
.
IsTrack
===
undefined
&&
(
!
drawingObjects
||
AscFormat
.
getTargetTextObject
(
drawingObjects
)
!==
this
))
...
...
slide/Drawing/DrawingDocument.js
View file @
6b61c31d
...
...
@@ -5687,8 +5687,8 @@ function CNotesDrawer(page)
g
.
m_oCoordTransform
.
ty
=
-
this
.
Scroll
;
g
.
transform
(
1
,
0
,
0
,
1
,
0
,
0
);
g
.
IsNoDrawingEmptyPlaceholder
=
true
;
g
.
IsNoDrawingEmptyPlaceholderText
=
true
;
//
g.IsNoDrawingEmptyPlaceholder = true;
//
g.IsNoDrawingEmptyPlaceholderText = true;
this
.
HtmlPage
.
m_oDrawingDocument
.
isDrawingNotes
=
true
;
this
.
HtmlPage
.
m_oLogicDocument
.
Notes_Draw
(
this
.
Slide
,
g
);
...
...
slide/Editor/Format/Presentation.js
View file @
6b61c31d
...
...
@@ -1856,6 +1856,7 @@ CPresentation.prototype =
oController
.
selectObject
(
Image
,
0
);
this
.
Recalculate
();
this
.
Document_UpdateInterfaceState
();
this
.
CheckEmptyPlaceholderNotes
();
}
},
...
...
@@ -1908,6 +1909,7 @@ CPresentation.prototype =
_this
.
Slides
[
_this
.
CurPage
].
graphicObjects
.
resetSelection
();
_this
.
Slides
[
_this
.
CurPage
].
graphicObjects
.
selectObject
(
Image
,
0
);
_this
.
Document_UpdateInterfaceState
();
this
.
CheckEmptyPlaceholderNotes
();
},
[],
false
,
AscDFH
.
historydescription_Presentation_AddChart
);
},
...
...
@@ -1983,6 +1985,7 @@ CPresentation.prototype =
this
.
Recalculate
();
this
.
Document_UpdateInterfaceState
();
this
.
Document_UpdateSelectionState
();
this
.
CheckEmptyPlaceholderNotes
();
}
else
{
...
...
@@ -3427,6 +3430,19 @@ CPresentation.prototype =
return
bRetValue
;
},
CheckEmptyPlaceholderNotes
:
function
(){
var
oCurSlide
=
this
.
Slides
[
this
.
CurPage
];
if
(
oCurSlide
&&
oCurSlide
.
notesShape
){
var
oContent
=
oCurSlide
.
notesShape
.
getDocContent
();
if
(
oContent
&&
oContent
.
Is_Empty
()){
this
.
DrawingDocument
.
Notes_OnRecalculate
(
this
.
CurPage
,
this
.
Slides
[
this
.
CurPage
].
NotesWidth
,
this
.
Slides
[
this
.
CurPage
].
getNotesHeight
());
return
true
;
}
}
return
false
;
},
OnMouseDown
:
function
(
e
,
X
,
Y
,
PageIndex
)
{
this
.
CurPage
=
PageIndex
;
...
...
@@ -3446,6 +3462,7 @@ CPresentation.prototype =
this
.
Document_UpdateSelectionState
();
}
this
.
Document_UpdateInterfaceState
();
this
.
CheckEmptyPlaceholderNotes
();
},
OnMouseUp
:
function
(
e
,
X
,
Y
,
PageIndex
)
...
...
@@ -3516,6 +3533,7 @@ CPresentation.prototype =
e
.
ctrlKey
=
e
.
CtrlKey
;
e
.
shiftKey
=
e
.
ShiftKey
;
var
ret
=
oCurSlide
.
notes
.
graphicObjects
.
onMouseDown
(
e
,
X
,
Y
);
this
.
CheckEmptyPlaceholderNotes
();
if
(
!
ret
)
{
this
.
Document_UpdateSelectionState
();
...
...
@@ -4629,6 +4647,7 @@ CPresentation.prototype =
this
.
bGoToPage
=
true
;
this
.
bNeedUpdateTh
=
true
;
this
.
FocusOnNotes
=
false
;
this
.
CheckEmptyPlaceholderNotes
();
}
else
if
(
this
.
Slides
[
this
.
CurPage
])
...
...
slide/Editor/Format/ShapePrototype.js
View file @
6b61c31d
...
...
@@ -583,7 +583,14 @@ CShape.prototype.recalculateContent2 = function()
{
return
;
}
var
text
=
typeof
pHText
[
0
][
this
.
nvSpPr
.
nvPr
.
ph
.
type
]
===
"
string
"
&&
pHText
[
0
][
this
.
nvSpPr
.
nvPr
.
ph
.
type
].
length
>
0
?
pHText
[
0
][
this
.
nvSpPr
.
nvPr
.
ph
.
type
]
:
pHText
[
0
][
AscFormat
.
phType_body
];
var
text
;
if
(
this
.
parent
instanceof
AscCommonSlide
.
CNotes
&&
this
.
nvSpPr
.
nvPr
.
ph
.
type
===
AscFormat
.
phType_body
){
text
=
"
Click to add notes
"
;
}
else
{
text
=
typeof
pHText
[
0
][
this
.
nvSpPr
.
nvPr
.
ph
.
type
]
===
"
string
"
&&
pHText
[
0
][
this
.
nvSpPr
.
nvPr
.
ph
.
type
].
length
>
0
?
pHText
[
0
][
this
.
nvSpPr
.
nvPr
.
ph
.
type
]
:
pHText
[
0
][
AscFormat
.
phType_body
];
}
if
(
!
this
.
txBody
.
content2
){
this
.
txBody
.
content2
=
AscFormat
.
CreateDocContentFromString
(
AscCommon
.
translateManager
.
getValue
(
text
),
this
.
getDrawingDocument
(),
this
.
txBody
);
}
...
...
slide/Editor/Format/Slide.js
View file @
6b61c31d
...
...
@@ -1072,6 +1072,15 @@ Slide.prototype =
this
.
notesShape
.
contentWidth
=
Width
;
this
.
notesShape
.
contentHeight
=
2000
;
}
this
.
notesShape
.
transformText2
=
this
.
notesShape
.
transformText
;
this
.
notesShape
.
invertTransformText2
=
this
.
notesShape
.
invertTransformText
;
var
oOldGeometry
=
this
.
notesShape
.
spPr
.
geometry
;
this
.
notesShape
.
spPr
.
geometry
=
null
;
this
.
notesShape
.
extX
=
Width
;
this
.
notesShape
.
extX
=
2000
;
this
.
notesShape
.
recalculateContent2
();
this
.
notesShape
.
spPr
.
geometry
=
oOldGeometry
;
this
.
notesShape
.
pen
=
AscFormat
.
CreateNoFillLine
();
}
},
this
,
[]);
},
...
...
@@ -1533,10 +1542,10 @@ AscFormat.CTextBody.prototype.Get_AbsoluteColumn = function(CurPage)
AscFormat
.
CTextBody
.
prototype
.
checkCurrentPlaceholder
=
function
()
{
var
presentation
=
editor
.
WordControl
.
m_oLogicDocument
;
if
(
presentation
.
Slides
[
presentation
.
CurPage
]
)
var
oCurController
=
presentation
.
GetCurrentController
();
if
(
oCurController
)
{
return
presentation
.
Slides
[
presentation
.
CurPage
].
graphicObjects
.
getTargetDocContent
()
===
this
.
content
;
return
oCurController
.
getTargetDocContent
()
===
this
.
content
;
}
return
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