now .inlineMixin(..) also can handle .__action_handlers...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2020-12-19 14:54:28 +03:00
parent f571b6bc7b
commit 040d839511
2 changed files with 12 additions and 2 deletions

View File

@ -1724,7 +1724,8 @@ module.MetaActions = {
// defaults... // defaults...
options = options || {} options = options || {}
var descriptors = options.descriptors == null ? true : false var descriptors = options.descriptors == null ? true : false
var all_attr_types = options.all_attr_types == null ? false : true var all_attr_types = !!options.all_attr_types
var action_handlers = !!options.action_handlers
var source_tag = options.source_tag var source_tag = options.source_tag
resetHandlerCache = (this.resetHandlerCache || MetaActions.resetHandlerCache) resetHandlerCache = (this.resetHandlerCache || MetaActions.resetHandlerCache)
@ -1763,6 +1764,13 @@ module.MetaActions = {
|| attr instanceof Action){ || attr instanceof Action){
that[k] = attr } that[k] = attr }
// copy the action handlers...
if(action_handlers && k == '__action_handlers' && attr){
var h = that[k] = {}
Object.entries(attr)
.forEach(function([k, v]){
h[k] = v.slice() }) }
// source tag actions... // source tag actions...
// XXX should this set action and method .source_tag or only action??? // XXX should this set action and method .source_tag or only action???
//if(source_tag && attr instanceof Action){ //if(source_tag && attr instanceof Action){
@ -1833,6 +1841,8 @@ module.MetaActions = {
// not be affected... // not be affected...
// NOTE: this will not affect event handlers, they should be removed // NOTE: this will not affect event handlers, they should be removed
// manually if needed... // manually if needed...
//
// XXX do .__action_handlers???
inlineMixout: function(from, options){ inlineMixout: function(from, options){
// defaults... // defaults...
options = options || {} options = options || {}

View File

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