Commit 956bccf0 authored by Sergey Luzyanin's avatar Sergey Luzyanin

copu selected objects in group

parent 8d94e301
...@@ -951,9 +951,12 @@ Slide.prototype = ...@@ -951,9 +951,12 @@ Slide.prototype =
copySelectedObjects: function(){ copySelectedObjects: function(){
var aSelectedObjects, i, fShift = 5.0; var aSelectedObjects, i, fShift = 5.0;
var oSelector = this.graphicObjects.selection.groupSelection ? this.graphicObjects.selection.groupSelection : this.graphicObjects; var oSelector = this.graphicObjects.selection.groupSelection ? this.graphicObjects.selection.groupSelection : this.graphicObjects;
aSelectedObjects = [].concat(this.graphicObjects.selectedObjects); aSelectedObjects = [].concat(oSelector.selectedObjects);
oSelector.resetSelection(undefined, false); oSelector.resetSelection(undefined, false);
var bGroup = this.graphicObjects.selection.groupSelection ? true : false; var bGroup = this.graphicObjects.selection.groupSelection ? true : false;
if(bGroup){
oSelector.normalize();
}
for(i = 0; i < aSelectedObjects.length; ++i){ for(i = 0; i < aSelectedObjects.length; ++i){
var oCopy = aSelectedObjects[i].copy(); var oCopy = aSelectedObjects[i].copy();
oCopy.x = aSelectedObjects[i].x; oCopy.x = aSelectedObjects[i].x;
...@@ -968,11 +971,14 @@ Slide.prototype = ...@@ -968,11 +971,14 @@ Slide.prototype =
this.addToSpTreeToPos(undefined, oCopy); this.addToSpTreeToPos(undefined, oCopy);
} }
else{ else{
oCopy.setGroup(oSelector); oCopy.setGroup(aSelectedObjects[i].group);
oSelector.addToSpTree(undefined, oCopy); aSelectedObjects[i].group.addToSpTree(undefined, oCopy);
} }
oSelector.selectObject(oCopy, 0); oSelector.selectObject(oCopy, 0);
} }
if(bGroup){
oSelector.updateCoordinatesAfterInternalResize();
}
}, },
Get_AllImageUrls: function(images) Get_AllImageUrls: function(images)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment