Group.createFromConfig will now check to see if the config contains either internalCreateCallback or internalRemoveCallback and set them accordingly. This fixes an issue where the callbacks would never be set if specified in an array of single configuration objects. Fix #6519

This commit is contained in:
Richard Davey 2023-07-21 18:12:33 +01:00
parent bebc146125
commit 4fa348e161

View file

@ -431,6 +431,16 @@ var Group = new Class({
this.removeCallback = options.removeCallback; this.removeCallback = options.removeCallback;
} }
if (options.internalCreateCallback)
{
this.internalCreateCallback = options.internalCreateCallback;
}
if (options.internalRemoveCallback)
{
this.internalRemoveCallback = options.internalRemoveCallback;
}
for (var c = 0; c < range.length; c++) for (var c = 0; c < range.length; c++)
{ {
var created = this.create(0, 0, range[c].a, range[c].b, visible, active); var created = this.create(0, 0, range[c].a, range[c].b, visible, active);