Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 04-19-2012, 04:04 PM   #1
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Javascript double click

Good evening to all!
I'm working on a WAF (Image Gallery) and I need to use the ondblclick event to catch a double click.

It seems that Kindle Touch can't use it!

I could simulate the double tap using onclick and a time delay, but it isn't a good solution as I always get that delay and it isn't funny.

In the WAF's config.xml I found this:

Code:
<param name="multi_tap" value="yes"/>
and that's exactly what I need.
Is there a way to catch that event?
Thanks a lot!!!
silver18 is offline   Reply With Quote
Old 04-19-2012, 04:41 PM   #2
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
I've tried to use dblclick event, but for Pillow stuff. Anyway, Pillow and WAF are backed by the same system-wide WebKit library, so my experience could be possibly applied for your case.

So, in my experiments, double tap should've been made VERY fast to produce dblclick event. No, really, VERY FAST.

(And with dblclick, click event was also produced.)
eureka is offline   Reply With Quote
Advert
Old 04-19-2012, 04:56 PM   #3
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Really so fast???
I was tapping at 100 Hz!!

I already managed the two onclick events produced by doubleclick, but I couldn't get the Kindle to catch the double click!

I tried a different way, but ondblclick still remains the better thing to do!

I'll try it again and let you know!
silver18 is offline   Reply With Quote
Old 04-19-2012, 05:04 PM   #4
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
100 Hz is fast enough so maybe Pillow app can catch dblclick but WAF app can't...
eureka is offline   Reply With Quote
Old 04-19-2012, 05:30 PM   #5
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
I tried it again, but no luck!

I came to manage the double click with onclick and timedelay, using an if condition so that I don't get the delay every time!

It works, by now....but definitely not elegant!
silver18 is offline   Reply With Quote
Advert
Old 04-20-2012, 08:49 AM   #6
mr.w0lf
n00b
mr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with othersmr.w0lf plays well with others
 
Posts: 58
Karma: 2802
Join Date: Jan 2012
Device: Kindle Touch
"multi_tap" may stand for "tap with more than 1 finger"
mr.w0lf is offline   Reply With Quote
Old 04-20-2012, 09:46 AM   #7
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
I think the multi-tap it's actually just like the double-click.
2 fingers should be managed by:

Code:
<param name="pinchzoom" value="yes" properties="fire-on-zoom:1"/>

Last edited by silver18; 05-06-2012 at 12:20 PM.
silver18 is offline   Reply With Quote
Old 04-20-2012, 11:56 AM   #8
thatworkshop
hub
thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.thatworkshop ought to be getting tired of karma fortunes by now.
 
thatworkshop's Avatar
 
Posts: 715
Karma: 2151032
Join Date: Jan 2012
Location: Iranian in Canada
Device: K3G, DXG, Kobo mini
Somehow related to your question:
Is there any way to make dictionary work in browser (Kindle Touch)? select a word by touching and showing the menu as in the ebook reader.

Spoiler:
I saw the following in config.xml of browser which confirms that it's possible:
<param name="hold" value="yes"/>
thatworkshop is offline   Reply With Quote
Old 05-06-2012, 12:26 PM   #9
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Here's how I fixed this problem:

Code:
var doubleclicks = 0;
var timer;

function doubleClick () {

	doubleclicks = 0;
	clearTimeout(timer);
	ENTER WHAT DO YOU WANT TO DO HERE
			
}

function simulateDoubleClick () {
			
	doubleclicks = doubleclicks + 1;
	if (timer) clearTimeout(timer);
	timer = setTimeout(function() { singleClick (); }, 550);
		
	if (doubleclicks == 2) {
		doubleClick ();
	}
}

function singleClick() {
	
	ENTER WHAT DO YOU WANT TO DO HERE
			
}
and here's how to call it:

Code:
onClick="simulateDoubleClick ()"
silver18 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Turn Off Double Click to Edit BetterRed Calibre 2 03-28-2012 05:34 AM
interface tweak - can I customise double click ? cybmole Calibre 8 09-29-2011 01:35 AM
Kindle 3 Page-turn button noise: Click or no click? samonakuba Amazon Kindle 12 07-25-2011 05:21 PM
double click mfaine Calibre 1 11-09-2009 10:56 AM
Anti- 1-click buy settings. 1-click is security risk? Need support from community med007 Amazon Kindle 14 07-30-2009 12:37 AM


All times are GMT -4. The time now is 06:47 PM.


MobileRead.com is a privately owned, operated and funded community.