Repositioning Tools Extension

Description

Hello every one! Today I introduce my third extension, which is repositioning tools extension.
This extension give you the ability to drag your components any where on the screen, without needing to drop it in another arrangement,This will be useful for many users who are making animations and they need the user to drag something by himself , like swiping to delete or making parallax effect,etc…
Actually, i’ve got the extension idea from @nikzdreamer2001 here.
i’ve called this extension repositioning tools and not drag tools ,etc… so i’ve the ability to update it with others repositoining tools like scaling,zooming,etc…:grinning:

Blocks picture

Designer properties

Documentation

Block Description
Draging This event is raised when the component is being dragged.

Params Type Description
component Component The component that’ve been dragged
x Number (int) The x position of the component that dragged
y Number (int) The y position of the component that dragged

Error This event is raised when there is an error.

Params Type Description
error String The error message

Dragged This event is raised when the component is dropped anywhere in the screen.

Params Type Description
component Component The component that’ve been dragged
x Number (int) The x position of the component that dragged
y Number (int) The y position of the component that dragged

Register component as draggable so the extension can detect drags on.

Params Type Description
component Component The component will be draggable
horizontal Boolean Determines if the component can be dragged horizontally
vertical Boolean Determines if the component can be dragged vertically

If both the horizontal and vertical parameters set to true, you can drag the component any where in the screen, horizontally and vertically.
Unregister Unregisters the component so the extension won't detect drags on the component, and the user can’t drag it anymore.

Params Type Description
component Component The component that has to be unregistered

Sets the shadow elevation when the component is being dragged.


Params Type Description
ElevationShadow Number (int) The shadow elevation value

Screen recording

Notes

If you’ve registered component that you’ve already registered the old parameters will be overwritten and no errors will occur.

Usages

I will update this section here with new usages:
1- Swipe to remove list view:
I’m going to share its blocks as soon as i complete it :wink:

Download links

AIX: io.mohamed.RepositioningTools.aix (15.6 KB)

Credits

Thanks for @WaterMelonIceGaming for the documentation table.
Thanks for any one who liked this extension :heart:.If you’ve liked it please hit the like button :grin:
Any suggestions, bug reports will be considered, just tell me below and i will try my best to implement it :wink:

Regards,
Mohamed Tamer

8 Likes

Great :smiley: @MohamedTamer

4 Likes

Cool.!
​​




5 Likes

Thanks @AryanGupta and @Kumaraswamy for your comments :blush:

5 Likes

nice extension @MohamedTamer !

4 Likes

Thanks @Aarush :grinning:

4 Likes

Great Extension @MohamedTamer

6 Likes

Thanks for your comment @Ravi :blush:

6 Likes

Till now, I think this is your best extension ever. Very helpful extension

3 Likes

Amazing Extension @MohamedTamer :tada:

3 Likes

This is very awesome extension.
Is there a way to limit the drag-able element in its parent. I mean that it should not go out side its parent. When its reaches the boundaries it should not go any further.

3 Likes

maybe using the when dragging block and check the x and y and change the x any y we can manage it somehow

1 Like

Hello @ZainUlHassan !
There is no built-in way to do that, but I’m planning to add this feature in an upcoming update, Currently you can try @Aarush’s workaround.

1 Like