origami.js icon indicating copy to clipboard operation
origami.js copied to clipboard

[WIP] New shape method

Open raphamorim opened this issue 9 years ago • 2 comments

  • More elegant
  • More More lighter
  • Better to test

New API design:

old way

Reads CSS without read/search by elements

origami('#canvas')
  .load(".className")
  .shape(".className")
  .draw();

new way

NOTE: Now element must exist in DOM.

<div class="className">...</div>
origami('#canvas')
  .shape(".className").draw(); // maybe origami().html() would be better

raphamorim avatar Apr 12 '16 03:04 raphamorim

Coverage Status

Coverage remained the same at 91.667% when pulling 3dfd38549c97c7219c24fc385e29af93a80f4e1d on feature/new-html2canvas into 252534827a5dc53ef98bd75ee1411304074a5780 on master.

coveralls avatar Apr 12 '16 03:04 coveralls

Ref: #29

raphamorim avatar Apr 12 '16 03:04 raphamorim