This commit is contained in:
Max Lynch
2015-11-29 17:20:11 -06:00
parent 45dc983752
commit 9d54bfcd0b
18 changed files with 275 additions and 42 deletions
+12 -6
View File
@@ -59,12 +59,18 @@ export class Plugin {
addPixelsY: -40 // added a negative value to move it up a bit (default 0)
});
console.log('Doing method', method, 'on Plugin', this.plugin, 'args:', args);
// TODO: Pass args
this.plugin[method].apply(this.plugin, args).then(() => {
console.log('Success', arguments);
}, (err) => {
console.error('Error', err);
});
let v = this.plugin[method].apply(this.plugin, args);
if(v && v.then) {
v.then(() => {
console.log('Success', arguments);
}, (err) => {
console.error('Error', err);
});
} else {
console.log('Response: ', v);
}
}
}