public
Created

A modified version of core.js from the blossom test project that is not rendering as expected. I would expect to see a maroon rectangle inside of green rectangle.

  • Download Gist
Blossom sublayer
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
MyApp.layer = SC.Layer.create({
layout: { width: 600, height: 400, top: 10, left: 10 },
render: function(ctx) {
ctx.fillStyle = '#859900'; // green
ctx.fillRect(0, 0, ctx.width, ctx.height);
}
});
 
MyApp.widget = SC.Widget.create({
layout: {
width: 100, height: 60, top: 10,left: 10
},
render: function(ctx) {
ctx.fillStyle = "#990000"; // maroon
ctx.fillRect(0,0, ctx.width, ctx.height);
}
});
 
MyApp.layer.addSublayer(MyApp.widget);
 
function main() {
var ui = MyApp.ui,
layer = MyApp.layer;
 
ui.get('layers').pushObject(layer);
SC.app.set('ui', ui);
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.