var canvas = new fabric.Canvas('c');
/*
NOTE: THIS IS WORKING NOW - By adding true to the end of the initialize
callSuper, it started working. Like this:
this.callSuper('initialize', objects, options, true);
The problem I'm having is that the color of the fabric.Rect in the subclassed group is getting changed to black.When I do it directly in fabric.Group it displays in red which is correct. When I do it fabric.CustomGroup it displays in black which is not what I want. The JSON is identical with the exception of the type being 'group' in one case and 'customGroup' in the other.
I've been playing with variations on fromObject but I can't seem to figure out what I'm doing wrong. The change seems to happen when I "enliven" the objects in the custom group.
Click on the "Load Group" button to see the red rect and the "Load Custom Group" button to see the black rect.
*/
const PARAM_TYPE = "#_type_#";
const PARAM_TYPE_GROUP = "group";
const PARAM_TYPE_CUSTOM_GROUP = "customGroup";
var json_template =...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.