Skip to content

Commit

Permalink
Added touchstart event
Browse files Browse the repository at this point in the history
Fixes #312
  • Loading branch information
simonseyock committed May 24, 2018
1 parent 9cbf58d commit f38ee20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controls/LayerSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ export class LayerSelector extends mixin(Control, ListenerOrganizerMixin) {
}

this.listenAt($button)
.on('click', () => {
.on('click touchstart', () => {
toggleButtonActive()
this.dispatchEvent({
type: 'click:layer',
Expand All @@ -582,7 +582,7 @@ export class LayerSelector extends mixin(Control, ListenerOrganizerMixin) {

if (featureInfoCheckable) {
$button.append($toggleFeatureInfo)
this.listenAt($toggleFeatureInfo).on('click', e => {
this.listenAt($toggleFeatureInfo).on('click touchstart', e => {
setCheckboxActive(!$toggleFeatureInfo.hasClass(this.classNames_.featureInfoActive))
e.stopPropagation()
})
Expand Down

0 comments on commit f38ee20

Please sign in to comment.