Jump to content


Photo

How do I select 2 objects at once?


  • Please log in to reply
1 reply to this topic

#1 Jaime

Jaime

    FireStarter

  • Members
  • PipPip
  • 25 posts

Posted 07 January 2012 - 02:08 PM

Hello

I was doing some testing commands. The following example I have a question:

//--- Create a rectangle ---//
fw.getDocumentDOM (). addNewRectanglePrimitive ({left: 10, top 10, right 60, bottom: 60}, 0);
//--- I get the selection of the rectangle ---//
var selrectangle = fw.selection;

//--- Create a circle ---//
fw.getDocumentDOM (). addNewOval ({left: 10, top 10, right: 70, bottom: 70});
//--- I get the circle selection ---//
var seloval = fw.selection;

//--- Create a triangle ---//
fw.getDocumentDOM (). addNewStar (3, -1, false, {x: 37 and: 43}, {x: 71 and: 62});
//--- I get the triangle selection ---//
var selstar = fw.selection;

//--- Select Object: selrectangle, seloval, Selstar ---//
fw.selection = selrectangle;

So far I have no problem because I can select any object created

QUESTIONS: How I can select 2 objects created at the same time and not just one?
For example, as I can select the rectangle and circle at the same time or rectangle and triangle at the same time?

I appreciate any assistance



Jaime

PS: I use google translator, I hope you understand

#2 Jaime

Jaime

    FireStarter

  • Members
  • PipPip
  • 25 posts

Posted 11 January 2012 - 11:34 AM

Hello

I found a solution

fw.selection = [selrectangle, selstar];