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
0703ec84
Commit
0703ec84
authored
Mar 29, 2017
by
Sergey Luzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 34568
parent
a63bf7c9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
7 deletions
+26
-7
cell/model/DrawingObjects/Format/ShapePrototype.js
cell/model/DrawingObjects/Format/ShapePrototype.js
+3
-3
common/Drawings/CommonController.js
common/Drawings/CommonController.js
+22
-3
slide/Editor/Format/Slide.js
slide/Editor/Format/Slide.js
+1
-1
No files found.
cell/model/DrawingObjects/Format/ShapePrototype.js
View file @
0703ec84
...
...
@@ -167,7 +167,7 @@ function addToDrawings(worksheet, graphic, position, lockByDefault, anchor)
if
(
!
worksheet
)
return
;
var
ret
,
aObjects
=
worksheet
.
Drawings
;
if
(
AscFormat
.
isRealNumber
(
position
))
{
if
(
AscFormat
.
isRealNumber
(
position
)
&&
position
>
-
1
&&
position
<=
aObjects
.
length
)
{
aObjects
.
splice
(
position
,
0
,
drawingObject
);
ret
=
position
;
}
...
...
@@ -212,7 +212,7 @@ function CChangesDrawingObjectsAddToDrawingObjects(Class, Pos){
this
.
Type
=
AscDFH
.
historyitem_AutoShapes_AddToDrawingObjects
;
AscDFH
.
CChangesBase
.
call
(
this
,
Class
);
}
CChangesDrawingObjectsAddToDrawingObjects
.
prototype
=
Object
.
create
(
AscDFH
.
CChangesBase
.
prototype
);
CChangesDrawingObjectsAddToDrawingObjects
.
prototype
=
Object
.
create
(
AscDFH
.
CChangesBase
.
prototype
);
CChangesDrawingObjectsAddToDrawingObjects
.
prototype
.
constructor
=
CChangesDrawingObjectsAddToDrawingObjects
;
CChangesDrawingObjectsAddToDrawingObjects
.
prototype
.
Undo
=
function
(){
AscFormat
.
deleteDrawingBase
(
this
.
Class
.
worksheet
.
Drawings
,
this
.
Class
.
Get_Id
());
...
...
@@ -237,7 +237,7 @@ function CChangesDrawingObjectsRemoveFromDrawingObjects(Class, Pos){
this
.
Pos
=
Pos
;
AscDFH
.
CChangesBase
.
call
(
this
,
Class
);
}
CChangesDrawingObjectsRemoveFromDrawingObjects
.
prototype
=
Object
.
create
(
AscDFH
.
CChangesBase
.
prototype
);
CChangesDrawingObjectsRemoveFromDrawingObjects
.
prototype
=
Object
.
create
(
AscDFH
.
CChangesBase
.
prototype
);
CChangesDrawingObjectsRemoveFromDrawingObjects
.
prototype
.
constructor
=
CChangesDrawingObjectsRemoveFromDrawingObjects
;
CChangesDrawingObjectsRemoveFromDrawingObjects
.
prototype
.
Undo
=
function
(){
AscFormat
.
addToDrawings
(
this
.
Class
.
worksheet
,
this
.
Class
,
this
.
Pos
);
...
...
common/Drawings/CommonController.js
View file @
0703ec84
...
...
@@ -6439,15 +6439,29 @@ DrawingObjectsController.prototype =
unGroupCallback
:
function
()
{
var
ungroup_arr
=
this
.
canUnGroup
(
true
);
var
ungroup_arr
=
this
.
canUnGroup
(
true
)
,
aGraphicObjects
;
if
(
ungroup_arr
.
length
>
0
)
{
this
.
resetSelection
();
var
i
,
j
,
cur_group
,
sp_tree
,
sp
;
var
i
,
j
,
cur_group
,
sp_tree
,
sp
,
nInsertPos
;
for
(
i
=
0
;
i
<
ungroup_arr
.
length
;
++
i
)
{
cur_group
=
ungroup_arr
[
i
];
cur_group
.
normalize
();
aGraphicObjects
=
this
.
getDrawingObjects
();
nInsertPos
=
undefined
;
for
(
j
=
0
;
j
<
aGraphicObjects
.
length
;
++
j
)
{
if
(
aGraphicObjects
[
j
]
===
cur_group
)
{
nInsertPos
=
j
;
break
;
}
}
sp_tree
=
cur_group
.
spTree
;
for
(
j
=
0
;
j
<
sp_tree
.
length
;
++
j
)
{
...
...
@@ -6462,7 +6476,12 @@ DrawingObjectsController.prototype =
{
sp
.
spPr
.
setFill
(
cur_group
.
spPr
.
Fill
.
createDuplicate
());
}
sp
.
addToDrawingObjects
();
if
(
AscFormat
.
isRealNumber
(
nInsertPos
)){
sp
.
addToDrawingObjects
(
nInsertPos
+
j
);
}
else
{
sp
.
addToDrawingObjects
();
}
sp
.
checkDrawingBaseCoords
();
this
.
selectObject
(
sp
,
0
);
}
...
...
slide/Editor/Format/Slide.js
View file @
0703ec84
...
...
@@ -617,7 +617,7 @@ Slide.prototype =
shapeAdd
:
function
(
pos
,
item
)
{
this
.
checkDrawingUniNvPr
(
item
);
var
_pos
=
AscFormat
.
isRealNumber
(
pos
)
?
pos
:
this
.
cSld
.
spTree
.
length
;
var
_pos
=
(
AscFormat
.
isRealNumber
(
pos
)
&&
pos
>
-
1
&&
pos
<=
this
.
cSld
.
spTree
.
length
)
?
pos
:
this
.
cSld
.
spTree
.
length
;
History
.
Add
(
new
AscDFH
.
CChangesDrawingsContentPresentation
(
this
,
AscDFH
.
historyitem_SlideAddToSpTree
,
_pos
,
[
item
],
true
));
this
.
cSld
.
spTree
.
splice
(
_pos
,
0
,
item
);
},
...
...
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