now mix can inherit the object from MetaActions...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-09-27 06:13:57 +03:00
parent 3a3139cc6f
commit a915588e16
2 changed files with 9 additions and 2 deletions

View File

@ -1217,7 +1217,7 @@ object.makeConstructor('ActionSet', MetaActions)
// //
// This will pre-process an object to setup the action mechanics. // This will pre-process an object to setup the action mechanics.
// //
// If the 'this and prototype both contain a .config attribute then this // If the 'this' and prototype both contain a .config attribute then this
// will make set <actions>.config.__proto__ = <prototype>.config // will make set <actions>.config.__proto__ = <prototype>.config
// //
// //
@ -1307,6 +1307,13 @@ function(){
var args = [].slice.call(arguments) var args = [].slice.call(arguments)
var res = {} var res = {}
// special case: if MetaActions is in the args then inherit the root
// object from it...
if(args.indexOf(MetaActions) >= 0){
args.splice(args.indexOf(MetaActions), 1)
res.__proto__ = MetaActions
}
var mixin = MetaActions.inlineMixin var mixin = MetaActions.inlineMixin
args.forEach(function(p){ args.forEach(function(p){

View File

@ -1,6 +1,6 @@
{ {
"name": "ig-actions", "name": "ig-actions",
"version": "1.3.0", "version": "1.4.0",
"description": "", "description": "",
"main": "actions.js", "main": "actions.js",
"scripts": { "scripts": {