Ext 3.3.1 アプリケーションを Ext 4 に移行しようとしています (現時点では互換性レイヤーを使用)。GeoExt でいくつか問題が発生しました。現在、99 行目で「ページにロードされていないクラスから拡張しようとしています」と表示されています。99 行目は以下のコードのすべてです。
この問題に対処する方法についての提案やヒントは大歓迎です。ありがとう。
return selectControl;
},featureSelected:function(evt){
if(!this._selecting){
var store=this.grid.store;
var row=store.findBy(function(record,id){
return record.data.feature==evt.feature;
});
if(row!=-1&&!this.isSelected(row)){
this._selecting=true;
this.selectRow(row,!this.singleSelect);
this._selecting=false;
this.grid.getView().focusRow(row);
}
}
},
featureUnselected:function(evt){
if(!this._selecting){
var store=this.grid.store;
var row=store.findBy(function(record,id){
return record.data.feature==evt.feature;
});
if(row!=-1&&this.isSelected(row)){
this._selecting=true;
this.deselectRow(row);
this._selecting=false;
this.grid.getView().focusRow(row);
}
}
},
rowSelected:function(model,row,record){
var feature=record.data.feature;
if(!this._selecting&&feature){
var layers=this.getLayers();
for(var i=0,len=layers.length;i<len;i++){
if(layers[i].selectedFeatures.indexOf(feature)==-1){
this._selecting=true;
this.selectControl.select(feature);
this._selecting=false;
break;
}
}
}
},
rowDeselected:function(model,row,record){
var feature=record.data.feature;
if(!this._selecting&&feature){
var layers=this.getLayers();
for(var i=0,len=layers.length;i<len;i++){
if(layers[i].selectedFeatures.indexOf(feature)!=-1){
this._selecting=true;
this.selectControl.unselect(feature);
this._selecting=false;
break;
}
}
}
},
getLayers:function(){
return this.selectControl.layers||[this.selectControl.layer];
}
};
GeoExt.grid.FeatureSelectionModel=Ext.extend(Ext.grid.RowSelectionModel,GeoExt.grid.FeatureSelectionModelMixin);
Ext.namespace("GeoExt","GeoExt.data");
GeoExt.data.LayerReader=function(meta,recordType){
meta=meta||{};
if(!(recordType instanceof Function)){
recordType=GeoExt.data.LayerRecord.create(recordType||meta.fields||{});
}