File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -163,11 +163,21 @@ var App = (function ($, publ) {
163
163
}
164
164
} ) ;
165
165
}
166
-
166
+ // For map div focus settings
167
+ if ( options . target ) {
168
+ if ( options . target . getAttribute ( "tabindex" ) == null ) {
169
+ options . target . setAttribute ( "tabindex" , "0" )
170
+ }
171
+ }
167
172
map = new ol . Map ( {
168
173
target : options . target ,
169
174
layers : layerArr ,
170
- interactions : ol . interaction . defaults ( { mouseWheelZoom :false } ) ,
175
+ interactions : ol . interaction . defaults ( { mouseWheelZoom :false } ) . extend ( [
176
+ new ol . interaction . MouseWheelZoom ( {
177
+ constrainResolution : true , // force zooming to a integer zoom
178
+ condition : ol . events . condition . focus // only wheel/trackpad zoom when the map has the focus
179
+ } )
180
+ ] ) ,
171
181
controls : ol . control . defaults ( {
172
182
attributionOptions : ( {
173
183
collapsible : false
You can’t perform that action at this time.
0 commit comments