// first case
$('canvas').drawRect({
layer: true,
data: { w: 300 },
fillStyle: '#585',
x: 100, y: 100,
width: 100, height: 50
});
alert($('canvas').getLayer(0).data.w);
I can get the data out of the layer.
// second case
$('canvas').drawRect({
layer: true,
data: { w: 300 },
fillStyle: '#585',
x: 100, y: 100,
width: $('canvas').getLayer(0).data.w, height: 50
});
I can't get the data within the layer itself.