Fix onchangelistener to use e.target
For some reason the change listener for the edit fields used e.srcElement, this didn't seem to work everywhere. Using e.target should fix this.
This commit is contained in:
parent
8f8386505c
commit
480e8a49bc
1 changed files with 118 additions and 118 deletions
|
@ -1664,15 +1664,15 @@ class Graph {
|
|||
let graph = this;
|
||||
let el = function( e ) {
|
||||
console.info("Changed", e);
|
||||
let parts = e.srcElement.name.split( '-' );
|
||||
let parts = e.target.name.split( '-' );
|
||||
let field = parts.pop();
|
||||
let id = parts.join('-');
|
||||
let node = graph.getNodeById( id );
|
||||
let path = field.split( '.' ); // use vars.test to set ['vars']['test'] = value
|
||||
var res = node;
|
||||
let value = e.srcElement.value
|
||||
if(e.srcElement.type == 'checkbox') {
|
||||
value = e.srcElement.checked;
|
||||
let value = e.target.value
|
||||
if(e.target.type == 'checkbox') {
|
||||
value = e.target.checked;
|
||||
}
|
||||
for ( var i = 0; i < path.length; i++ ) {
|
||||
if ( i == ( path.length - 1 ) ) {
|
||||
|
|
Loading…
Reference in a new issue