This repository was archived by the owner on Jul 29, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix click and doubleclick events on items #2988
Merged
Merged
Changes from 4 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
dcb2d58
Fix redraw order
yotamberk 582fc64
Merge branch 'develop' of https://github.com/almende/vis into develop
yotamberk f96e6bf
Merge branch 'develop' of https://github.com/almende/vis into develop
yotamberk ffa8e0e
Merge branch 'develop' of https://github.com/almende/vis into develop
yotamberk 2f04345
Fix error when option is not defined
yotamberk 3cfa8d0
Allow template labels
yotamberk aee0fb3
Merge branch 'develop' of https://github.com/almende/vis into develop
yotamberk 4681ace
Merge branch 'develop' of https://github.com/almende/vis into develop
yotamberk e9d1ebf
Merge branch 'develop' of https://github.com/almende/vis into develop
yotamberk cd37b2d
Merge branch 'develop' of https://github.com/almende/vis into develop
yotamberk 9a27aa7
Merge branch 'develop' of https://github.com/almende/vis into develop
yotamberk 4982679
Add .travis.yml file
yotamberk b9144d3
Add experiment travis code
yotamberk 001fd9f
Merge branch 'develop' of https://github.com/almende/vis into develop
yotamberk e504dc7
Merge branch 'develop' of https://github.com/yotamberk/vis into develop
yotamberk ada1c90
Fix react example
yotamberk 3124d8e
Merge branch 'develop' of https://github.com/almende/vis into develop
yotamberk 4870ad2
Merge branch 'develop' of https://github.com/almende/vis into develop
yotamberk fae21a0
Merge branch 'develop' of https://github.com/almende/vis into develop
yotamberk 91c2c31
Merge branch 'develop' of https://github.com/almende/vis into develop
yotamberk ea1d8c1
Merge branch 'develop' of https://github.com/almende/vis into develop
yotamberk af16ffc
Merge branch 'develop' of https://github.com/almende/vis into develop
yotamberk 099a8e7
Merge branch 'develop' of https://github.com/almende/vis into develop
yotamberk 0362af6
Fix item click and doubleclick
yotamberk 608c4da
Remove new empty line
yotamberk 914937b
Return id of item tapped
yotamberk 9973b6e
Merge branch 'develop' into fix-click-item
yotamberk 91eba11
Merge branch 'develop' into fix-click-item
yotamberk 5ea07e1
Merge branch 'develop' into fix-click-item
yotamberk 8fefd5a
Merge branch 'develop' into fix-click-item
yotamberk 2d99aca
Merge branch 'develop' into fix-click-item
yotamberk 2bf3f43
Merge branch 'develop' into fix-click-item
yotamberk fe000da
Fix comments from Review
yotamberk eaaa9dc
Merge branch 'develop' of https://github.com/almende/vis into fix-cli…
yotamberk 527512a
Merge branch 'fix-click-item' of https://github.com/yotamberk/vis int…
yotamberk 96029f8
Add missing semicolon
yotamberk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -145,20 +145,20 @@ Item.prototype.repositionY = function() { | |
*/ | ||
Item.prototype._repaintDragCenter = function () { | ||
if (this.selected && this.options.editable.updateTime && !this.dom.dragCenter) { | ||
var me = this | ||
var me = this; | ||
// create and show drag area | ||
var dragCenter = document.createElement('div'); | ||
dragCenter.className = 'vis-drag-center'; | ||
dragCenter.dragCenterItem = this; | ||
this.hammer = new Hammer(dragCenter) | ||
var hammer = new Hammer(dragCenter) | ||
|
||
this.hammer.on('tap', function (event) { | ||
hammer.on('tap', function (event) { | ||
me.parent.itemSet.body.emitter.emit('click', { | ||
event: event, | ||
item: me.id | ||
}); | ||
}); | ||
this.hammer.on('doubletap', function (event) { | ||
hammer.on('doubletap', function (event) { | ||
event.stopPropagation(); | ||
me.parent.itemSet._onUpdateItem(me); | ||
me.parent.itemSet.body.emitter.emit('doubleClick', { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am trusting that this block is correct; it is congruent to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK |
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
semicolon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done