Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

interact.js

  1. yumedoll

    JavaScript drawImage on a canvas in the position where an element has been dropped into it?

    I'm making a game about baking a decorating a cake using Interact.js. Everything is done so far but I'm trying to figure out how to make it so the image that is dragged onto the cake (which has a canvas in it's div) will be printed on the canvas at the exact position it was dropped. The idea...
  2. yumedoll

    JavaScript Interact.js: Snap rotation to certain angles?

    I have this script I picked off of a codepen interact('.drag-rotate') .draggable({ onstart: function (event) { const element = event.target; const rect = element.getBoundingClientRect(); // store the center as the element has css `transform-origin: center center`...
Back
Top Bottom