afcode Posted May 5, 2021 Share Posted May 5, 2021 Hello, I have a Canvas that is as large as the browser window (I want to support from 1080p to 4k). Currently I can move my container, which is most of the time larger than the canvas, I can move it around everywhere -> also out of the canvas vision. I want to restrict the container to only move out of the desired corner like about 30px. Please see the figures for a better understanding. I managed to get something like this with checking the current position of the container after very drag and drop and in this event to set the position of it to an allowed setting. But my solution does not work on different screen sizes. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.