Skip to content

Instantly share code, notes, and snippets.

@jodyheavener
Created February 22, 2020 21:49
Show Gist options
  • Select an option

  • Save jodyheavener/bfbb3b957a24603f152e3aeade8b90a2 to your computer and use it in GitHub Desktop.

Select an option

Save jodyheavener/bfbb3b957a24603f152e3aeade8b90a2 to your computer and use it in GitHub Desktop.
Creating a simple Rectangle with DTPM
import { insert, Rectangle } from 'dtpm/document';
const rectangle = new Rectangle({
name: 'Example',
width: 100,
height: 200,
fill: '#2345ac'
});
// insert it in the page afterward
insert(rectangle);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment