Closed Bug 864892 Opened 12 years ago Closed 12 years ago

dom/browser-element/BrowserElementPanning.js kinetic panning does not work with hand made touch events

Categories

(Firefox OS Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: vingtetun, Assigned: vingtetun)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Patch (obsolete) — Splinter Review
Let's normalize them.
Assignee: nobody → 21
Attachment #740939 - Flags: review?(fabrice)
Comment on attachment 740939 [details] [diff] [review] Patch Review of attachment 740939 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/browser-element/BrowserElementPanning.js @@ +681,5 @@ > > + _getTime: function kp_getTime(time) { > + // Touch events generated by the platform or hand-made have different > + // timestamps values. Let's normalize them. > + if (time > 2 * Date.now()) { that's quite... ugly no? time > Date.now() is not enough? @@ +685,5 @@ > + if (time > 2 * Date.now()) { > + return Math.floor(time / 1000); > + } else { > + return time; > + } Nit: You have a bunch of trailing whitespace at almost every line.
Attachment #740939 - Flags: review?(fabrice)
The right fix for this would be bug 77992. In the meantime I will address your comments and land that.
Attached patch PatchSplinter Review
Attachment #740939 - Attachment is obsolete: true
Attachment #747940 - Flags: review?(fabrice)
Comment on attachment 747940 [details] [diff] [review] Patch Review of attachment 747940 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/browser-element/BrowserElementPanning.js @@ +681,5 @@ > > momentums: [], > record: function kp_record(delta, timestamp) { > + this.momentums.push({ 'time': this._getTime(timestamp), > + 'dx' : delta.x, 'dy' : delta.y }); nit: align 'dx' with 'time' @@ +686,5 @@ > this.distance.add(delta.x, delta.y); > }, > > + _getTime: function kp_getTime(time) { > + // Touch events generated by the platform or hand-made have are defined in nit: s/have//
Attachment #747940 - Flags: review?(fabrice) → review+
Depends on: 77992
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: