Add framer
api option to get cursor coordinates inside the root canvas
#110
Labels
enhancement
New feature or request
Describe your use case
I am trying to build a plugin that supports drag and drop to add svg images.
The architecture of my plugin is that is running inside an iframe environment to render a responsive webpage that contains the svgs I want to drag and drop. As inside the iframe I dont have the
Draggable
component available orframer
api available I had to implement a workaround to make drag and drop work.Currently drag and drop is working inside the iframe but the drop position is not accurate. This is what I am doing.
framer.addSvg
functionsetAttributes()
to override node attributes, inside those attributes there are options likebottom
,top
.... but I dont know what are the exact coordinates where the icon was dropped (cursor position).Describe the solution you'd like
You can add an option to get exact coordinates when the cursor is when the svg was dropped so I can use those coordinates to move the inserted icon to that position.
Another option is to make framer automatically detect mouse position and add svg using
framer.addSVG
in that position.Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
The text was updated successfully, but these errors were encountered: