ColorPicker: Firefox compatibility #37

Merged
merged 1 commit into from Mar 4, 2012

Projects

None yet

2 participants

@bpierre
Contributor
bpierre commented Mar 3, 2012

No description provided.

@tj tj commented on the diff Mar 4, 2012
build/ui.js
@@ -597,6 +597,17 @@ function rgba(r,g,b,a) {
}
/**
+ * Mouse position util.
+ */
+function localPos(e) {
+ var offset = $(e.target).offset();
+ return {
+ x: e.pageX - offset.left
+ , y: e.pageY - offset.top
+ };
@tj
tj Mar 4, 2012 Member

still amazes me that jquery does not abstract this for you

@tj
tj Mar 4, 2012 Member

haha shesh.. that's kinda silly, offset{x,y} is what I use the most since I do lots of canvas work

@tj tj merged commit cfef365 into visionmedia:master Mar 4, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment