Home / Topic / Trigger on release in drag is set incorrectly

Trigger on release in drag is set incorrectly

Home Kwiksher Forums Kwik4 Trigger on release in drag is set incorrectly

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • #86059

    The option for “trigger on release” in the drag functions only when the “if locked” option is checked. If I want to trigger an object upon release without the drag object being locked, the function is still called with the “if locked” code. Looking at the code it seems to me the locked option doesn’t look for the locked code while the unlocked option looks for the locked code. It should be the reverse.

    On release (no lock):

    elseif event.phase == “ended” or event.phase == “cancelled” then
    t.bodyType = t.oriBodyType
    if (myObject_lock == 0) then
    UI.dragLayer = dragLayer
    scene:dispatchEvent({name=”action_myAction”, event={UI=UI} })
    end

    On release, if locked:

    elseif event.phase == “ended” or event.phase == “cancelled” then
    t.bodyType = t.oriBodyType
    UI.dragLayer = dragLayer
    scene:dispatchEvent({name=”action_myAction”, event={UI=UI} })
    end

    Yamamoto
    Keymaster
    #86062

    Fixed. The codes of no lock and locked are swapped. It will be migrated into the next build of Kwik

    https://github.com/kwiksher/kwik4tmplt/blob/master/components/pageXXX/layer_drag.lua

    Thank you for the bug report.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.