Skip to content

Feature addition: Include an element's size in the draggable interface #1978

@gavinsykes

Description

@gavinsykes

Hi all,

First-time contributor so please forgive any errors or faux pas!

I have been working on a project these last few weeks that required a div that is draggable and resizable, and after trying to build it from scratch by myself for wayyyy longer than I should have done, it was still a mess. I decided at that point, more in hope than expectation, to see if jQuery had a way to make it easier and, well, here we are!

What I have been building is an image uploader that then crops the image to the user's wishes, which has meant having a canvas drawing the part of the picture that is covered by the overlaying <div> whenever it is moved or resized. One thing I noticed however is that whilst resizable's ui object returns the position and size, draggable's only returns the position, so the addition of the element's size is what I am looking to add in here. I have the code ready to go (at least according to my local testing) but thought better than just submitting a PR out of the blue. The branch is at https://github.com/gavinsykes/jquery-ui/tree/add-size-data-to-draggable-ui

Any questions, please ask! 😄

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy