Sameer Anand

Results 12 comments of Sameer Anand

``` canvas.getActiveObject() - Returns the currently active object. ``` If you wanted to do something if the active / selected object is of a specific type, you can do: ```...

Actually, I thought you aren't able to click on anything in grab mode.. You're just panning around the canvas. In that case, you are right about using events.

You need to use getActiveGroup to get the selected objects.

You can also make an object clickable in grab mode by setting the objects' selectable property to true. ``` if (canvas.getActiveGroup()) { canvas.getActiveGroup().forEachObject(function(obj) { // Do something with the selected...

This is how you make objects selectable in grab mode. My above post shows how to get the selected objects, or object if only one object is selected. ``` if...

You need to call obj.setCoords() where the object is the object that your plugin interacts with. ``` if (canvas.getActiveGroup()) { canvas.getActiveGroup().forEachObject(function(obj) { obj.setCoords(); }); } else { var obj =...

Would be great if the API was simply: ```ts { name: '...', type: 'string', options: { list: async () => { const res = await ... return res // {...

@gonzaloriestra If this is still an issue, why close this/mark this complete? I just ran into this issue.

Same issue with me, but works after adding `@shopify/api-codegen-preset` to root.