Hi Simon, Hi admls,
great, volant looks pretty like movable. You know how I longed for that!
Yours Jan

Am 18.03.2019 um 23:36 schrieb BurningTreeC:

    Hi Jan,

    Thank you! It has a long way to go yet, but I think it is promising!

        At the moment it doesn't seem to get touch-gestures (or is
        this my browser/my tablet fault?)


    You're right. That's definitely on my to-do list. I thought it
    would be best to get the desktop version out and see if there is
    enough interest before diving into mobile/touch features (as it is
    further outside my wheelhouse).


Hi @admls, I can help with that! It's pretty easy, maybe you already know what to do with a description (I can also help with an example later):

- there's the hammerjs plugin in the tiddlywiki plugin library, you can require that on top of your tiddler where you listen for the dragging events, like

|
if($tw.browser &&!window.Hammer){
window.Hammer=require("$:/plugins/tiddlywiki/hammerjs/hammer.js");
}
|

Hammer does the things needed so that you can drag with mouse and fingers

in your widget's "render" function you could do:

|
this.hammer = new Hammer.Manager(domNode);

this.hammer.add(new Hammer.Pan({
event: 'pan',
pointers: 1,
threshold: 0,
direction: Hammer.DIRECTION_ALL
}));
|

then you can add the drag-listener:

|
this.hammer.on('touchmove panstart panmove dragstart draginit drag', function(event) {
//do something while dragging, move domNode using coordinates in event
});
|

and the dragend:

|
.on('panend pancancel touchend mouseup dragend draginitup', function(e) {
//dragging finished
});
|


You can see a full example here: http://hamschinken.tiddlyspot.com/#%24%3A%2Fplugins%2FBurningTreeC%2FHammerWidgets%2Fmodules%2Fwidgets%2Fmove.js

all the best, btc
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscr...@googlegroups.com <mailto:tiddlywiki+unsubscr...@googlegroups.com>. To post to this group, send email to tiddlywiki@googlegroups.com <mailto:tiddlywiki@googlegroups.com>.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/ab41a6d1-c456-439d-8027-d1a59bf65b98%40googlegroups.com <https://groups.google.com/d/msgid/tiddlywiki/ab41a6d1-c456-439d-8027-d1a59bf65b98%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/5C90A0FC.9010309%40googlemail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to