Mobile app version of vmapp.org
Login or Join
Jennifer810

: 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

@Jennifer810

Posted in: #SketchApp

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?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Jennifer810

1 Comments

Sorted by latest first Latest Oldest Best

 

@Annie732

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!

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme