Created
November 30, 2017 07:23
-
-
Save genakim/fefcd71b7b14b3d6c60f6bdfeb76f7db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var me = this, | |
vm = me.getViewModel(), | |
rec = vm.get('rec'), | |
grid = me.lookup('grid'); | |
var range = Ext.getStore('StructuresBase').getRange(); | |
var structureStore = vm.getStore('Structures'); | |
var root = me.getTree(range, rec); | |
structureStore.setRootNode(root); | |
if(rec){ | |
var selection = structureStore.getNodeById(rec.getId()); | |
grid.setSelection(selection); | |
setTimeout(function(){ | |
var domSelection = grid.getView().getNode(selection); | |
domSelection.scrollIntoView(false); | |
console.log(domSelection); | |
}, 300); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment