: How can I see if it is a circle or a path in Sketch? I have a circle-like path in Sketch. How can I now see if it's really a circle (i.e it was created with the Oval tool) or if it's
I have a circle-like path in Sketch. How can I now see if it's really a circle (i.e it was created with the Oval tool) or if it's just a path with the shape of a circle.
They look the same and all the settings are the same, but when I export them to an SVG file the circle will be translated to a circle-tag and the path will be translated to a path-tag, which is a great difference.
Is there a way to differentiate them at all?
More posts by @Jennifer810
1 Comments
Sorted by latest first Latest Oldest Best
You can do that easily via a plugin that checks what selectedLayer.layers().objectAtIndex(0).className() looks like.
Just copy and paste the following into the Plugins › Custom Plugin window, hit Save… and give it a nice name like Is this a circle? :)
try {
var c = selection[0].layers().objectAtIndex(0).className()
if(c == "MSOvalShape") {
[doc showMessage:"Selected layer is a circle"]
} else {
[doc showMessage:"Selected layer is NOT a circle"]
}
} catch(e) {
[doc showMessage:"Selected layer is NOT a circle"]
}
Hope it helps!
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.