Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kityminder-core
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
吴志俊
kityminder-core
Commits
d896284a
Commit
d896284a
authored
Mar 10, 2014
by
techird
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复Firefox不响应mousewheel的问题
parent
3d19060c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
minder.event.js
src/core/minder.event.js
+13
-9
No files found.
src/core/minder.event.js
View file @
d896284a
...
...
@@ -13,7 +13,7 @@ kity.extendClass( Minder, {
},
// TODO: mousemove lazy bind
_bindPaperEvents
:
function
()
{
this
.
_paper
.
on
(
'click dblclick mousedown contextmenu mouseup mousemove mousewheel touchstart touchmove touchend'
,
this
.
_firePharse
.
bind
(
this
)
);
this
.
_paper
.
on
(
'click dblclick mousedown contextmenu mouseup mousemove mousewheel
DOMMouseScroll
touchstart touchmove touchend'
,
this
.
_firePharse
.
bind
(
this
)
);
if
(
window
)
{
window
.
addEventListener
(
'resize'
,
this
.
_firePharse
.
bind
(
this
)
);
}
...
...
@@ -27,6 +27,10 @@ kity.extendClass( Minder, {
_firePharse
:
function
(
e
)
{
var
beforeEvent
,
preEvent
,
executeEvent
;
if
(
e
.
type
==
'DOMMouseScroll'
)
{
e
.
type
=
'mousewheel'
;
e
.
wheelDelta
=
e
.
originEvent
.
wheelDelta
=
e
.
originEvent
.
detail
*
120
;
}
beforeEvent
=
new
MinderEvent
(
'before'
+
e
.
type
,
e
,
true
);
if
(
this
.
_fire
(
beforeEvent
)
)
{
...
...
@@ -67,14 +71,14 @@ kity.extendClass( Minder, {
var
callbacks
=
this
.
_eventCallbacks
[
e
.
type
.
toLowerCase
()
]
||
[];
if
(
status
)
{
if
(
status
)
{
callbacks
=
callbacks
.
concat
(
this
.
_eventCallbacks
[
status
+
'.'
+
e
.
type
.
toLowerCase
()
]
||
[]
);
callbacks
=
callbacks
.
concat
(
this
.
_eventCallbacks
[
status
+
'.'
+
e
.
type
.
toLowerCase
()
]
||
[]
);
}
if
(
callbacks
.
length
==
0
)
{
if
(
callbacks
.
length
===
0
)
{
return
;
}
var
lastStatus
=
this
.
getStatus
();
...
...
@@ -92,14 +96,14 @@ kity.extendClass( Minder, {
},
on
:
function
(
name
,
callback
)
{
var
km
=
this
;
utils
.
each
(
name
.
split
(
/
\s
+/
),
function
(
i
,
n
)
{
utils
.
each
(
name
.
split
(
/
\s
+/
),
function
(
i
,
n
)
{
km
.
_listen
(
n
.
toLowerCase
(),
callback
);
});
}
);
return
this
;
},
off
:
function
(
name
,
callback
)
{
var
types
=
name
.
split
(
/
\s
+/
);
var
types
=
name
.
split
(
/
\s
+/
);
var
i
,
j
,
callbacks
,
removeIndex
;
for
(
i
=
0
;
i
<
types
.
length
;
i
++
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment