Skip to content

Commit

Permalink
use mouse down instead click for map layer click event (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmfrnz committed Apr 18, 2017
1 parent 24bcc54 commit 659b185
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/models/LayerModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ define([
// store model reference
this.attributes.mapLayer.options.layerModel = this

this.initInteractions(this.attributes.mapLayer)
this.initInteractions()

if (typeof callback !== 'undefined') {
callback(this.attributes.mapLayer)
Expand All @@ -99,10 +99,11 @@ define([
if (this.attributes.type === "point") {

this.attributes.mapLayer
.off('click')
.on('click',_.bind(this.pointLayerClick,this))
.on('mouseover',_.bind(this.pointLayerMouseOver,this))
.off('mousedown')
.on('mousedown',_.bind(this.pointLayerClick,this))
.off('mousemove')
.on('mousemove',_.bind(this.pointLayerMouseOver,this))
.off('mouseout')
.on('mouseout',_.bind(this.pointLayerMouseOut,this))
}
},
Expand Down

0 comments on commit 659b185

Please sign in to comment.