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
14380bc8
Commit
14380bc8
authored
Jul 06, 2017
by
SergeyLuzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
notes search
parent
03afcc94
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
80 additions
and
21 deletions
+80
-21
slide/Editor/Format/Presentation.js
slide/Editor/Format/Presentation.js
+48
-2
slide/Editor/Format/ShapePrototype.js
slide/Editor/Format/ShapePrototype.js
+25
-14
slide/Editor/Format/Slide.js
slide/Editor/Format/Slide.js
+7
-5
No files found.
slide/Editor/Format/Presentation.js
View file @
14380bc8
...
...
@@ -1423,7 +1423,11 @@ CPresentation.prototype =
if
(
this
.
Slides
.
length
>
0
)
{
var
i
,
Id
,
content
,
start_index
;
var
target_text_object
=
AscFormat
.
getTargetTextObject
(
this
.
Slides
[
this
.
CurPage
].
graphicObjects
);
var
target_text_object
;
var
oCommonController
=
this
.
GetCurrentController
();
if
(
oCommonController
){
target_text_object
=
AscFormat
.
getTargetTextObject
(
oCommonController
);
}
if
(
target_text_object
)
{
if
(
target_text_object
.
getObjectType
()
===
AscDFH
.
historyitem_type_GraphicFrame
)
...
...
@@ -1448,6 +1452,7 @@ CPresentation.prototype =
}
}
var
sp_tree
=
this
.
Slides
[
this
.
CurPage
].
cSld
.
spTree
,
group_shapes
,
group_start_index
;
var
bSkipCurNotes
=
false
;
if
(
isNext
)
{
if
(
this
.
Slides
[
this
.
CurPage
].
graphicObjects
.
selection
.
groupSelection
)
...
...
@@ -1501,6 +1506,10 @@ CPresentation.prototype =
else
if
(
this
.
Slides
[
this
.
CurPage
].
graphicObjects
.
selectedObjects
.
length
===
0
)
{
start_index
=
0
;
if
(
this
.
FocusOnNotes
){
start_index
=
sp_tree
.
length
;
bSkipCurNotes
=
true
;
}
}
else
{
...
...
@@ -1522,6 +1531,14 @@ CPresentation.prototype =
{
return
Id
;
}
var
oCurSlide
=
this
.
Slides
[
this
.
CurPage
];
if
(
oCurSlide
.
notesShape
&&
!
bSkipCurNotes
){
Id
=
oCurSlide
.
notesShape
.
Search_GetId
(
isNext
,
false
);
if
(
Id
!==
null
)
{
return
Id
;
}
}
for
(
i
=
this
.
CurPage
+
1
;
i
<
this
.
Slides
.
length
;
++
i
)
{
Id
=
this
.
Slides
[
i
].
Search_GetId
(
isNext
,
0
);
...
...
@@ -1529,6 +1546,13 @@ CPresentation.prototype =
{
return
Id
;
}
if
(
this
.
Slides
[
i
].
notesShape
){
Id
=
this
.
Slides
[
i
].
notesShape
.
Search_GetId
(
isNext
,
false
);
if
(
Id
!==
null
)
{
return
Id
;
}
}
}
for
(
i
=
0
;
i
<
this
.
CurPage
;
++
i
)
{
...
...
@@ -1537,7 +1561,15 @@ CPresentation.prototype =
{
return
Id
;
}
if
(
this
.
Slides
[
i
].
notesShape
){
Id
=
this
.
Slides
[
i
].
notesShape
.
Search_GetId
(
isNext
,
false
);
if
(
Id
!==
null
)
{
return
Id
;
}
}
}
}
else
{
...
...
@@ -1586,7 +1618,7 @@ CPresentation.prototype =
}
if
(
i
===
sp_tree
.
length
)
{
start_index
=
sp_tree
.
length
;
start_index
=
-
1
;
}
}
else
if
(
this
.
Slides
[
this
.
CurPage
].
graphicObjects
.
selectedObjects
.
length
===
0
)
...
...
@@ -1615,6 +1647,13 @@ CPresentation.prototype =
}
for
(
i
=
this
.
CurPage
-
1
;
i
>
-
1
;
--
i
)
{
if
(
this
.
Slides
[
i
].
notesShape
){
Id
=
this
.
Slides
[
i
].
notesShape
.
Search_GetId
(
isNext
,
false
);
if
(
Id
!==
null
)
{
return
Id
;
}
}
Id
=
this
.
Slides
[
i
].
Search_GetId
(
isNext
,
this
.
Slides
[
i
].
cSld
.
spTree
.
length
-
1
);
if
(
Id
!==
null
)
{
...
...
@@ -1623,6 +1662,13 @@ CPresentation.prototype =
}
for
(
i
=
this
.
Slides
.
length
-
1
;
i
>
this
.
CurPage
;
--
i
)
{
if
(
this
.
Slides
[
i
].
notesShape
){
Id
=
this
.
Slides
[
i
].
notesShape
.
Search_GetId
(
isNext
,
false
);
if
(
Id
!==
null
)
{
return
Id
;
}
}
Id
=
this
.
Slides
[
i
].
Search_GetId
(
isNext
,
this
.
Slides
[
i
].
cSld
.
spTree
.
length
-
1
);
if
(
Id
!==
null
)
{
...
...
slide/Editor/Format/ShapePrototype.js
View file @
14380bc8
...
...
@@ -770,31 +770,42 @@ CShape.prototype.getIsSingleBody = function(x, y)
return
true
;
};
CShape
.
prototype
.
Set_CurrentElement
=
function
(
bUpdate
,
pageIndex
)
{
if
(
this
.
parent
)
{
CShape
.
prototype
.
Set_CurrentElement
=
function
(
bUpdate
,
pageIndex
){
if
(
this
.
parent
){
var
drawing_objects
=
this
.
parent
.
graphicObjects
;
drawing_objects
.
resetSelection
(
true
);
if
(
this
.
group
)
{
if
(
this
.
group
){
var
main_group
=
this
.
group
.
getMainGroup
();
drawing_objects
.
selectObject
(
main_group
,
0
);
main_group
.
selectObject
(
this
,
0
);
main_group
.
selection
.
textSelection
=
this
;
drawing_objects
.
selection
.
groupSelection
=
main_group
;
}
else
{
else
{
drawing_objects
.
selectObject
(
this
,
0
);
drawing_objects
.
selection
.
textSelection
=
this
;
}
//var content = this.getDocContent();
//content && content.Set_StartPage(this.parent.num);
if
(
editor
.
WordControl
.
m_oLogicDocument
.
CurPage
!==
this
.
parent
.
num
)
{
editor
.
WordControl
.
m_oLogicDocument
.
Set_CurPage
(
this
.
parent
.
num
);
editor
.
WordControl
.
GoToPage
(
this
.
parent
.
num
);
var
nSlideNum
;
if
(
this
.
parent
instanceof
AscCommonSlide
.
CNotes
){
editor
.
WordControl
.
m_oLogicDocument
.
FocusOnNotes
=
true
;
if
(
this
.
parent
.
slide
){
nSlideNum
=
this
.
parent
.
slide
.
num
;
this
.
parent
.
slide
.
graphicObjects
.
resetSelection
();
}
else
{
nSlideNum
=
0
;
}
}
else
{
nSlideNum
=
this
.
parent
.
num
;
editor
.
WordControl
.
m_oLogicDocument
.
FocusOnNotes
=
false
;
}
if
(
editor
.
WordControl
.
m_oLogicDocument
.
CurPage
!==
nSlideNum
){
editor
.
WordControl
.
m_oLogicDocument
.
Set_CurPage
(
nSlideNum
);
editor
.
WordControl
.
GoToPage
(
nSlideNum
);
if
(
this
.
parent
instanceof
AscCommonSlide
.
CNotes
){
editor
.
WordControl
.
m_oLogicDocument
.
FocusOnNotes
=
true
;
}
}
}
};
...
...
slide/Editor/Format/Slide.js
View file @
14380bc8
...
...
@@ -303,13 +303,15 @@ Slide.prototype =
},
Search
:
function
(
Str
,
Props
,
Engine
,
Type
)
{
Search
:
function
(
Str
,
Props
,
Engine
,
Type
){
var
sp_tree
=
this
.
cSld
.
spTree
;
for
(
var
i
=
0
;
i
<
sp_tree
.
length
;
++
i
)
{
if
(
sp_tree
[
i
].
Search
)
for
(
var
i
=
0
;
i
<
sp_tree
.
length
;
++
i
){
if
(
sp_tree
[
i
].
Search
){
sp_tree
[
i
].
Search
(
Str
,
Props
,
Engine
,
Type
);
}
}
if
(
this
.
notesShape
){
this
.
notesShape
.
Search
(
Str
,
Props
,
Engine
,
Type
);
}
},
...
...
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