Closed bplok20010 closed 4 years ago
How would it do this?
@taion offset can only obtain the location information of a node at present, but I also hope to set its location information, such as when dragging.
jQuery has such functions, sometimes it is very convenient.
You can use the css()
method to do that. That's what jquery is doing and it's probably not worth the extra code path here.
@jquense
The css()
method can do it.
What I hope is that users don't need to pay attention to the level of DOM, and use offset(e.g offset(node,coords )
) to set the coordinates relative to the window, which actually extends the function of offset, but it does bring more code.
But they look like a couple :).
I created a npm package to implement.
I don't want to create a package to implement the set offset function. Can dom-helpers support it? e.g.