|
|
I was able to handle a similar issue by setting my "on.once" to a variable and then removing the variable in a callback function.
weatherActive = on.once(map, "click", Weather);
function Weather() { weatherSearch.clear(); weatherActive.remove();
On 6/2/2017 at 12:00 PM, [hidden email] wrote: Send Dojo-interest mailing list submissions to [hidden email]
To subscribe or unsubscribe via the World Wide Web, visit http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest or, via email, send a message with subject or body 'help' to [hidden email]
You can reach the person managing the list at [hidden email]
When replying, please edit your Subject line so it is more specific than "Re: Contents of Dojo-interest digest..."
Today's Topics:
1. [Topic, 1, Toggler] Dojo-interest Digest, Vol 150, Issue 1 (Jason A. Griffin) 2. Strange issue with dGrid (Harry Devine)
----------------------------------------------------------------------
Message: 1 Date: Thu, 01 Jun 2017 13:06:03 -0400 From: "Jason A. Griffin" <[hidden email]> Subject: [Dojo-interest] [Topic, 1, Toggler] Dojo-interest Digest, Vol 150, Issue 1 To: [hidden email] Message-ID: <[hidden email]> Content-Type: text/plain; charset="utf-8"
I scrapped Toggler and went directly to dojo/_base/fx fx.animateProperty works perfectly. require(["dojo/dom-style", "dojo/on", "dojo/dom", "dojo/query", "dojo/_base/fx", "dojo/domReady!"], function(domStyle, on, dom, query, fx) { tocButtonClicked = false; on(dom.byId("tocButton"), "click", function(evt) { if (tocButtonClicked === false) { domStyle.set("toc", "visibility", "visible"); fx.animateProperty({ node: dom.byId("toc"), duration: 50, properties: { opacity: { start: 0, end: 1 } } }).play(); tocButtonClicked = true; } else { fx.animateProperty({ node: dom.byId("toc"), duration: 50, properties: { opacity: { start: 1, end: 0 } }, onEnd: function(evt) { domStyle.set("toc", "visibility", "hidden"); } }).play(); tocButtonClicked = false; } }); on(query("#toc .titleButton.close"), "click", function(evt) { fx.animateProperty({ node: dom.byId("toc"), duration: 50, properties: { opacity: { start: 1, end: 0 } }, onEnd: function(evt) { domStyle.set("toc", "visibility", "hidden"); } }).play(); tocButtonClicked = false; }); }); On 6/1/2017 at 12:00 PM, [hidden email] wrote:Send Dojo-interest mailing list submissions to [hidden email]
To subscribe or unsubscribe via the World Wide Web, visit http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest or, via email, send a message with subject or body 'help' to [hidden email]
You can reach the person managing the list at [hidden email]
When replying, please edit your Subject line so it is more specific than "Re: Contents of Dojo-interest digest..." Today's Topics:
1. dojo.fx.Toggler (Jason A. Griffin) 2. Re: VisionMobile and JS Foundation Developer Ergonomics survey (Dylan Schiemann) ----------------------------------------------------------------------
Message: 1 Date: Wed, 31 May 2017 17:12:33 -0400 From: "Jason A. Griffin" Subject: [Dojo-interest] dojo.fx.Toggler To: [hidden email] Message-ID: Content-Type: text/plain; charset="utf-8"
https://dojotoolkit.org/reference-guide/1.10/dojo/fx/Toggler.html I need to set my div's Visibility Style to Hidden immediately after the .Hide() animation completes, otherwise, the animation gets clipped early and portions of the div linger on the screen longer than others. Fortunately, I can set the Visibility to Visible before I run the .Show() animation without worrying about timing issues. I couldn't track down any events using dojo.on so I turned my attention to dojo.Stateful to watch the opacity style value of my div but I couldn't seem to get it reporting the value change. Now I did see in the documentation that there is a parameter which should be callable in order to pause/resume/status track the animation but I couldn't connect the dots when digging through the objects parameters in my browser's console... Any help is appreciated, sincerely, Jason. require(["dojo/dom-style", "dojo/on", "dojo/dom", "dojo/query", "dojo/fx/Toggler", "dojo/domReady!"], function(domStyle, on, dom, query, Toggler) { tocToggler = new Toggler({ node: "toc", showDuration: 500, hideDuration: 250 }); tocButtonClicked = false; on(dom.byId("tocButton"), "click", function(evt) { if (tocButtonClicked === false) { domStyle.set("toc", "visibility", "visible"); tocToggler.show(); tocButtonClicked = true; } else { tocToggler.hide(); tocButtonClicked = false; domStyle.set("toc", "visibility", "hidden"); } }); on(query("#toc .titleButton.close"), "click", function(evt) { tocToggler.hide(); tocButtonClicked = false; domStyle.set("toc", "visibility", "hidden"); }); }); -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.dojotoolkit.org/pipermail/dojo-interest/attachments/20170531/b64a83e1/attachment.html
------------------------------
Message: 2 Date: Thu, 01 Jun 2017 05:13:52 -0700 From: Dylan Schiemann Subject: Re: [Dojo-interest] VisionMobile and JS Foundation Developer Ergonomics survey To: [hidden email], "dojo dev." Message-ID: Content-Type: text/plain; charset=ISO-8859-1
A quick reminder that there's two more weeks to help out with this survey. After the main set of questions, there's a module that's more specific to front-end and JS that should be filled out if you have 5-10 minutes. Thanks!
Regards, -Dylan
on 4/27/17, 05:09 (GMT-07:00) Dylan Schiemann said the following: > The JS Foundation is participating in VisionMobile's latest developer > economics survey and it would be great if you could complete the survey > in the link below. VisionMobile does really great research and in this > case, they're doing a study around developer ergonomics. > > http://vmob.me/DE3Q17js.foundation > > Regards, > -Dylan > ------------------------------
________________ Dojo Toolkit: http://dojotoolkit.org/ Tutorials: http://dojotoolkit.org/documentation/ Reference Guide: http://dojotoolkit.org/reference-guide API Documentation: http://dojotoolkit.org/api
[hidden email] To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest End of Dojo-interest Digest, Vol 150, Issue 1 ********************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.dojotoolkit.org/pipermail/dojo-interest/attachments/20170601/a6cd64ea/attachment.html
------------------------------
Message: 2 Date: Fri, 2 Jun 2017 09:36:09 -0400 (EDT) From: Harry Devine <[hidden email]> Subject: [Dojo-interest] Strange issue with dGrid To: [hidden email] Message-ID: <[hidden email]> Content-Type: text/plain; charset="utf-8"
I have a really strange issue with my dGrid that I was hoping someone could help with. I have an event handler where when I double click on a row, I display a Dijit dialog and make use of the grid row's ID property, make whatever updates I need, then click the OK button, which writes the changes back to a MySQL database via Dojo request.post. The OK button is using the on.once handler so it only runs once per double-click instance.
However, I've run into a situation where I noticed that some of the data in the grid was being duplicated/corrupted, and I've tracked it down when I double click on a row, and the dialog is displayed, then I hit Cancel, the on.once handler does not get cleared. So the next time that I open a dialog via the double click, I have an extra handler.
So my question is: how do I destroy an on handler that I no longer need?
Thanks,
Harry -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.dojotoolkit.org/pipermail/dojo-interest/attachments/20170602/a7df632c/attachment-0001.htm
------------------------------
________________ Dojo Toolkit: http://dojotoolkit.org/ Tutorials: http://dojotoolkit.org/documentation/ Reference Guide: http://dojotoolkit.org/reference-guide API Documentation: http://dojotoolkit.org/api
[hidden email] To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
End of Dojo-interest Digest, Vol 150, Issue 2 ********************************************* --
Dojo Toolkit: http://dojotoolkit.org/Tutorials: http://dojotoolkit.org/documentation/[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
|
|
That's what I did just before your response came through and it aired 5 great. Thanks for the help!
Harry
On Jun 2, 2017, at 2:26 PM, "Jason A. Griffin" < [hidden email]> wrote:
I was able to handle a similar issue by setting my "on.once" to a variable and then removing the variable in a callback function.
weatherActive = on.once(map, "click", Weather);
function Weather() { weatherSearch.clear(); weatherActive.remove();
On 6/2/2017 at 12:00 PM, [hidden email] wrote: Send Dojo-interest mailing list submissions to [hidden email]
To subscribe or unsubscribe via the World Wide Web, visit http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest or, via email, send a message with subject or body 'help' to [hidden email]
You can reach the person managing the list at [hidden email]
When replying, please edit your Subject line so it is more specific than "Re: Contents of Dojo-interest digest..."
Today's Topics:
1. [Topic, 1, Toggler] Dojo-interest Digest, Vol 150, Issue 1 (Jason A. Griffin) 2. Strange issue with dGrid (Harry Devine)
----------------------------------------------------------------------
Message: 1 Date: Thu, 01 Jun 2017 13:06:03 -0400 From: "Jason A. Griffin" <[hidden email]> Subject: [Dojo-interest] [Topic, 1, Toggler] Dojo-interest Digest, Vol 150, Issue 1 To: [hidden email] Message-ID: <[hidden email]> Content-Type: text/plain; charset="utf-8"
I scrapped Toggler and went directly to dojo/_base/fx fx.animateProperty works perfectly. require(["dojo/dom-style", "dojo/on", "dojo/dom", "dojo/query", "dojo/_base/fx", "dojo/domReady!"], function(domStyle, on, dom, query, fx) { tocButtonClicked = false; on(dom.byId("tocButton"), "click", function(evt) { if (tocButtonClicked === false) { domStyle.set("toc", "visibility", "visible"); fx.animateProperty({ node: dom.byId("toc"), duration: 50, properties: { opacity: { start: 0, end: 1 } } }).play(); tocButtonClicked = true; } else { fx.animateProperty({ node: dom.byId("toc"), duration: 50, properties: { opacity: { start: 1, end: 0 } }, onEnd: function(evt) { domStyle.set("toc", "visibility", "hidden"); } }).play(); tocButtonClicked = false; } }); on(query("#toc .titleButton.close"), "click", function(evt) { fx.animateProperty({ node: dom.byId("toc"), duration: 50, properties: { opacity: { start: 1, end: 0 } }, onEnd: function(evt) { domStyle.set("toc", "visibility", "hidden"); } }).play(); tocButtonClicked = false; }); }); On 6/1/2017 at 12:00 PM, [hidden email] wrote:Send Dojo-interest mailing list submissions to [hidden email]
To subscribe or unsubscribe via the World Wide Web, visit http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest or, via email, send a message with subject or body 'help' to [hidden email]
You can reach the person managing the list at [hidden email]
When replying, please edit your Subject line so it is more specific than "Re: Contents of Dojo-interest digest..." Today's Topics:
1. dojo.fx.Toggler (Jason A. Griffin) 2. Re: VisionMobile and JS Foundation Developer Ergonomics survey (Dylan Schiemann) ----------------------------------------------------------------------
Message: 1 Date: Wed, 31 May 2017 17:12:33 -0400 From: "Jason A. Griffin" Subject: [Dojo-interest] dojo.fx.Toggler To: [hidden email] Message-ID: Content-Type: text/plain; charset="utf-8"
https://dojotoolkit.org/reference-guide/1.10/dojo/fx/Toggler.html I need to set my div's Visibility Style to Hidden immediately after the .Hide() animation completes, otherwise, the animation gets clipped early and portions of the div linger on the screen longer than others. Fortunately, I can set the Visibility to Visible before I run the .Show() animation without worrying about timing issues. I couldn't track down any events using dojo.on so I turned my attention to dojo.Stateful to watch the opacity style value of my div but I couldn't seem to get it reporting the value change. Now I did see in the documentation that there is a parameter which should be callable in order to pause/resume/status track the animation but I couldn't connect the dots when digging through the objects parameters in my browser's console... Any help is appreciated, sincerely, Jason. require(["dojo/dom-style", "dojo/on", "dojo/dom", "dojo/query", "dojo/fx/Toggler", "dojo/domReady!"], function(domStyle, on, dom, query, Toggler) { tocToggler = new Toggler({ node: "toc", showDuration: 500, hideDuration: 250 }); tocButtonClicked = false; on(dom.byId("tocButton"), "click", function(evt) { if (tocButtonClicked === false) { domStyle.set("toc", "visibility", "visible"); tocToggler.show(); tocButtonClicked = true; } else { tocToggler.hide(); tocButtonClicked = false; domStyle.set("toc", "visibility", "hidden"); } }); on(query("#toc .titleButton.close"), "click", function(evt) { tocToggler.hide(); tocButtonClicked = false; domStyle.set("toc", "visibility", "hidden"); }); }); -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.dojotoolkit.org/pipermail/dojo-interest/attachments/20170531/b64a83e1/attachment.html
------------------------------
Message: 2 Date: Thu, 01 Jun 2017 05:13:52 -0700 From: Dylan Schiemann Subject: Re: [Dojo-interest] VisionMobile and JS Foundation Developer Ergonomics survey To: [hidden email], "dojo dev." Message-ID: Content-Type: text/plain; charset=ISO-8859-1
A quick reminder that there's two more weeks to help out with this survey. After the main set of questions, there's a module that's more specific to front-end and JS that should be filled out if you have 5-10 minutes. Thanks!
Regards, -Dylan
on 4/27/17, 05:09 (GMT-07:00) Dylan Schiemann said the following: > The JS Foundation is participating in VisionMobile's latest developer > economics survey and it would be great if you could complete the survey > in the link below. VisionMobile does really great research and in this > case, they're doing a study around developer ergonomics. > > http://vmob.me/DE3Q17js.foundation > > Regards, > -Dylan > ------------------------------
________________ Dojo Toolkit: http://dojotoolkit.org/ Tutorials: http://dojotoolkit.org/documentation/ Reference Guide: http://dojotoolkit.org/reference-guide API Documentation: http://dojotoolkit.org/api
[hidden email] To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest End of Dojo-interest Digest, Vol 150, Issue 1 ********************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.dojotoolkit.org/pipermail/dojo-interest/attachments/20170601/a6cd64ea/attachment.html
------------------------------
Message: 2 Date: Fri, 2 Jun 2017 09:36:09 -0400 (EDT) From: Harry Devine <[hidden email]> Subject: [Dojo-interest] Strange issue with dGrid To: [hidden email] Message-ID: <[hidden email]> Content-Type: text/plain; charset="utf-8"
I have a really strange issue with my dGrid that I was hoping someone could help with. I have an event handler where when I double click on a row, I display a Dijit dialog and make use of the grid row's ID property, make whatever updates I need, then click the OK button, which writes the changes back to a MySQL database via Dojo request.post. The OK button is using the on.once handler so it only runs once per double-click instance.
However, I've run into a situation where I noticed that some of the data in the grid was being duplicated/corrupted, and I've tracked it down when I double click on a row, and the dialog is displayed, then I hit Cancel, the on.once handler does not get cleared. So the next time that I open a dialog via the double click, I have an extra handler.
So my question is: how do I destroy an on handler that I no longer need?
Thanks,
Harry -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.dojotoolkit.org/pipermail/dojo-interest/attachments/20170602/a7df632c/attachment-0001.htm
------------------------------
________________ Dojo Toolkit: http://dojotoolkit.org/ Tutorials: http://dojotoolkit.org/documentation/ Reference Guide: http://dojotoolkit.org/reference-guide API Documentation: http://dojotoolkit.org/api
[hidden email] To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
End of Dojo-interest Digest, Vol 150, Issue 2 ********************************************* -- Dojo Toolkit: http://dojotoolkit.org/ Tutorials: http://dojotoolkit.org/documentation/
[hidden email] To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
--
Dojo Toolkit: http://dojotoolkit.org/Tutorials: http://dojotoolkit.org/documentation/[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
|
|