Hi!
How can I get the strokecolor of a selected Polygon?
i have tried with a number of things,
This is the latest (but it does not work):
'a = this.selectedAnnots; if (a.length) { var p = a[0].getProps(); p.strokecolor; };';
I am executing this string with RunJavaScript and want to get a string in return that I can use on another object.
Get strokecolor of selected Polygon
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
-
- Site Admin
- Posts: 17949
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
Re: Get strokecolor of selected Polygon
Hello magthenop,
Properties names are case sensitive. The below (executed in the end user Editor through the JS console, does print out "RGB,1,0,0" for a selected polygon object with red colour:
Regards,
Stefan
Properties names are case sensitive. The below (executed in the end user Editor through the JS console, does print out "RGB,1,0,0" for a selected polygon object with red colour:
Code: Select all
a = this.selectedAnnots; if (a.length) { var p = a[0].getProps(); p.strokeColor; };
console.println(p.strokeColor);
Stefan
-
- User
- Posts: 43
- Joined: Tue Sep 07, 2010 8:35 am
Re: Get strokecolor of selected Polygon
Jepp, that did the trick!
Thanks
Thanks
-
- Site Admin
- Posts: 17949
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London