Evan
Evan

Reputation: 6115

how can i add a background color to a layer kineticjs?

How can I add a background color to a layer in kineticjs? I want to have multiple layers which have different background colors.

Something like:

var layer = new Kinetic.Layer({
                x: 0,
                y: 0,
                width : that.locationData.getCreativeLeftLoc(),
                height : that.locationData.getCreativeTopLoc(),
                background-color : 'black'
            });

Upvotes: 1

Views: 2178

Answers (1)

Shmiddty
Shmiddty

Reputation: 13967

You can't. See the docs.

It goes Node > Container > Layer, none of which support drawing to themselves. They serve only to group other kinetic objects.

Upvotes: 4

Related Questions