This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Josh Ackerman
Posted Aug 04 - Read on Facebook

I have recently been using d3.js with FramerJS. I am wondering how Framer relates to various other HTML elements. For instance using d3.js, I want to add an SVG file to the body, I would write -
vis = d3.select('body').append('svg:svg')
.attr('width', w)
.attr('height', h)
where w and h are integers.
This works fine in fullscreen mode, although when I switch to a specific device, the device blocks the layer(s) I created. Is it possible to directly access the device to draw layers onto?

1 Comments

Sumul Shah

The root DOM element of your device's content is Framer.Device.content._element. You can pass that to d3.select(). Here's an example: http://share.framerjs.com/6swqf507g7ou/

Read the entire post on Facebook