forked from 0x2620/oxjs
add some more documentation, pass some more tests
This commit is contained in:
parent
c6d67420a8
commit
f2dbfbd1e5
9 changed files with 589 additions and 494 deletions
|
|
@ -35,7 +35,7 @@ Ox.load('UI', {
|
|||
})
|
||||
.appendTo(Ox.UI.$body);
|
||||
[
|
||||
'anyclick', 'singleclick', 'doubleclick', 'mouserepeat',
|
||||
'anyclick', 'singleclick', 'doubleclick', 'mousedown', 'mouserepeat',
|
||||
'dragstart', 'drag', 'dragenter', 'dragleave', 'dragpause', 'dragend'
|
||||
].forEach(function(event) {
|
||||
$target.bindEvent(event, function(e) {
|
||||
|
|
@ -44,13 +44,18 @@ Ox.load('UI', {
|
|||
.html(
|
||||
Ox.formatDate(date, '%H:%M:%S') + '.' + (Ox.pad(date % 1000, 3)) +
|
||||
' <span style="font-weight: bold">' + event + '</span> ' +
|
||||
JSON.stringify(Ox.extend(e.clientX ? {
|
||||
clientX: e.clientX,
|
||||
clientY: e.clientY,
|
||||
} : {}, e.clientDX ? {
|
||||
clientDX: e.clientDX,
|
||||
clientDY: e.clientDY
|
||||
} : {}))
|
||||
JSON.stringify(
|
||||
Ox.extend(e.clientX ? {
|
||||
clientX: e.clientX,
|
||||
clientY: e.clientY,
|
||||
} : {}, e.clientDX ? {
|
||||
clientDX: e.clientDX,
|
||||
clientDY: e.clientDY
|
||||
} : {})
|
||||
)
|
||||
.replace(/"/g, '')
|
||||
.replace(/:/g, ': ')
|
||||
.replace(/,/g, ', ')
|
||||
)
|
||||
.prependTo($log.$element);
|
||||
event == 'anyclick' && Ox.print(e);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue