Skip to content

Commit

Permalink
Fix some problems
Browse files Browse the repository at this point in the history
  • Loading branch information
simonseyock committed May 28, 2021
1 parent 63c9397 commit c844f67
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 20 deletions.
7 changes: 4 additions & 3 deletions classic/selection/FeatureModelMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Ext.define('GeoExt.selection.FeatureModelMixin', {
bindComponent: 'bindFeatureModel'
},
before: {
constructor: 'onConstruct',
onSelectChange: 'beforeSelectChange'
}
},
Expand Down Expand Up @@ -111,8 +112,8 @@ Ext.define('GeoExt.selection.FeatureModelMixin', {
*/
selectedFeatures: null,

constructor: function() {
me.callParent(arguments);
onConstruct: function() {
var me = this;

me.onSelectFeatAdd = me.onSelectFeatAdd.bind(me);
me.onSelectFeatRemove = me.onSelectFeatRemove.bind(me);
Expand All @@ -130,7 +131,7 @@ Ext.define('GeoExt.selection.FeatureModelMixin', {
me.selectedFeatures = new ol.Collection();

// detect a layer from the store if not passed in
if (!me.layer || !me.layer instanceof ol.layer.Vector) {
if (!me.layer || !(me.layer instanceof ol.layer.Vector)) {
var store = me.getStore();
if (store && store.getLayer && store.getLayer() &&
store.getLayer() instanceof ol.layer.Vector) {
Expand Down
16 changes: 3 additions & 13 deletions src/component/OverviewMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -610,19 +610,9 @@ Ext.define('GeoExt.component.OverviewMap', {
// call fit to assure that resolutions are available on
// overviewView

// Check for backwards compatibility
if (GeoExt.util.Version.isOl3()) {
overviewView.fit(
parentExtentProjected,
me.getMap().getSize(),
{constrainResolution: false}
);
} else {
overviewView.fit(
parentExtentProjected,
{constrainResolution: false}
);
}
overviewView.fit(
parentExtentProjected
);
overviewView.set(
'resolution',
me.getMagnification() * overviewView.getResolution()
Expand Down
8 changes: 4 additions & 4 deletions src/data/store/Layers.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,17 @@ Ext.define('GeoExt.data.store.Layers', {
constructor: function(config) {
var me = this;

me.onAddLayer = me.onAddLayer.bind(me);
me.onRemoveLayer = me.onRemoveLayer.bind(me);
me.onChangeLayer = me.onChangeLayer.bind(me);

me.callParent([config]);

if (config.map) {
this.bindMap(config.map);
} else if (config.layers) {
this.bindLayers(config.layers);
}

me.onAddLayer = me.onAddLayer.bind(me);
me.onRemoveLayer = me.onRemoveLayer.bind(me);
me.onChangeLayer = me.onChangeLayer.bind(me);
},

/**
Expand Down

0 comments on commit c844f67

Please sign in to comment.