scripting: add scrollIntoView()
This commit is contained in:
parent
22068ab47e
commit
7fc5372ca1
3 changed files with 26 additions and 6 deletions
|
|
@ -279,6 +279,24 @@ class ScriptVm extends Vm {
|
|||
|
||||
}
|
||||
|
||||
this.globals.scrollIntoView = (id, options)=>{
|
||||
|
||||
this.checkContext('setScroll')
|
||||
|
||||
var widgets = this.resolveId(id)
|
||||
|
||||
for (var i = widgets.length - 1; i >= 0; i--) {
|
||||
|
||||
if (widgets[i].container && widgets[i].isVisible()) {
|
||||
widgets[i].container.scrollIntoView(options)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
this.globals.httpGet = (url, callback)=>{
|
||||
|
||||
this.checkContext('httpGet')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue