Drag object within a group problem


(strmiska) #1

does anybody has a solution for dragging an object within a group to prevent moving faster than the mousecursor?
i use flexible layout and set a rectangle within a group. if i move this rectangle, it moves faster than my mousecursor.
this happens only within a group, setting the group to be scaled.
dragInGroup.hype.zip (11,2 KB)


Drag control problems + workaround
(Greg) #2

If you set the ‘On Drag’ Action to the group and remove the ‘On Drag’ Action on the rectangle it works, but that may not be what you want.


(strmiska) #3

unfortunately not. it indeed works correct, if the rectangle is outside the group, but failed inside. :confused: :fearful:


(Mark Hunte) #4

Defiantly something to do with the scaling on… affecting drag element in groups.

If you turn off for example the horizontal flexible scale <—> on the group, you will see dragging horizontal is normalised.

So this may be an un foreseen bug in the flexible scaling…


(strmiska) #5

indeed. i remember this also in hype 2.


(Mark Hunte) #6

Do you know if it was reported…


(strmiska) #7

i wrote to tumult today. in hype 2 i corrected this situation by using jquery, but this isn´t working anymore since 3.5


(Mark Hunte) #8

Can you post the jQuery you were using…


(strmiska) #9

DragPositionCenter.hype.zip (2,4 MB)

same here as soon as you group the objects …


(Mark Hunte) #10

Lol. I remember that Project…


#11

@strmiska

I turned off “Drag > Action > Control Element Position” on “Rechteck” and applied the same to “Gruppe” - it works correctly in the simple example You supplied. No changes made to scaling settings.

If I put this “Gruppe” inside another “Gruppe1” that has other elements, it still works. The rectangle drags correctly; other elements in “Gruppe1” are not affected.

Please see “dragInGroup_v2.hype.zip”

dragInGroup_v2.hype.zip (14.4 KB)


(Mark Hunte) #12

But then you do not get the enlarged rectangle that he seems to want.

Yours and his


#13

@strmiska @MarkHunte

Possibly I am still not understanding things - here’s another version with scaling applied to “Gruppe1”.

dragInGroup_v2a.hype.zip (14.5 KB)


(Mark Hunte) #14

That really odd,

Now when I remove the outer group, Your version still works correctly.

But I cannot recreate it in a new Project.!!!

Oh found it.

@JimScott, you put the drag on the group not the element. Which was suggested earlier but not what was needed.

So the problem still exists. :disappointed:


#15

@MarkHunte

Hmmm… I am clearly interpreting things differently as I look at the OP’s request.

does anybody has a solution for dragging an object within a group to prevent moving faster than the mouse cursor?

My version does this - the dragged object is in a group and syncs with the mouse movement.


i use flexible layout and set a rectangle within a group. if i move this rectangle, it moves faster than my mouse cursor.
this happens only within a group, setting the group to be scaled.

By putting the original group in another group it satisfies the flexible layout request as well as the drag element syncing with mouse. I am not interpreting a nested group as being proscribed in the OP’s request - the net effect matches his request. No other restrictions are spec’d.

Maybe @strmiska will chime in here at some point in the upcoming week and offer his thoughts.


(Mark Hunte) #16

I get what you are saying

But

And

Actually re reading strmiska reply,
It may be that @strmiska did understand what Greg was pointing out?


(strmiska) #17

ok - here i am again.
@JimScott - your version is correct, it fits to every screen. but my problem is different.
i created a simple puzzle game. therefore i have to drag and drop objects to a grid.
a grid wasn´t zoomable till hype 3.5 new API - groups and their objects inside can be zoomed.
this is a great feature to fit whole games to every screen, including their functionality, by creating a persistant symbol.
so now i can zoom the game, but unfortunately i get this strange movement.
on big screens the object moves faster than the mousecursor, on iphone slower.
as @MarkHunte mentioned before, this must be a bug in hypes otherwise great software.
here´s the grid version.
dragInGroupGrid.hype.zip (16,1 KB)