Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ENYO-1452: fix sample to handle being relaunched, old code was changi…

…ng list inside of kind definition

Enyo-DCO-1.1-Signed-Off-By: Ben Combee (ben.combee@palm.com)
  • Loading branch information...
commit 810177aea4c086913eaa8821db484f7ca1ac6c41 1 parent 7dedbcd
Ben Combee authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 samples/GestureSample.js
View
8 samples/GestureSample.js
@@ -52,12 +52,12 @@ enyo.kind({
],
create: function() {
this.inherited(arguments);
+ this.eventList = {};
+ this.eventCount = 0;
enyo.forEach(["All events","down","up","tap","move","enter","leave","dragstart","drag","dragover","hold","release","holdpulse","flick","gesturestart","gesturechange","gestureend"], enyo.bind(this, function(event) {
this.$.eventPicker.createComponent({content:event, style:"text-align:left"});
}));
},
- eventList:{},
- eventCount:0,
handleEvent: function(inSender, inEvent) {
var event = enyo.clone(inEvent);
if (this.monitorEvent && (event.type != this.monitorEvent)) {
@@ -147,6 +147,10 @@ enyo.kind({
truncateChanged: function() {
this.$.eventProps.addRemoveClass("gesture-sample-truncate", this.truncate);
},
+ // since event is an object, force set
+ setEvent: function(inEvent) {
+ this.setPropertyValue("event", inEvent, "eventChanged");
+ },
eventChanged: function(inOld) {
if (this.event) {
if (this.timeout) {
Please sign in to comment.
Something went wrong with that request. Please try again.