adamRenny / LayerJS

2D Canvas Library supporting Layered Rendering
MIT License
8 stars 1 forks source link

Container Div Style Application #52

Closed adamRenny closed 11 years ago

adamRenny commented 11 years ago

Currently, the application relies on the user to produce a div with the proper styles (all child canvases are position: absolute; with top-left of 0, it is relative).

This should be moved to the JS engine where a user could choose to pass in a division similar to how THREE.JS performs its operations.

Use cases:

  1. User provides a container div:
    • Layer applies position: relative; to the div
    • Layer checks for any child <canvas>es, applies position: absolute; top: 0; left: 0; to them
    • Continue workflow as normal
  2. User provides non-container div:
    • Layer throws exception
  3. User provides nothing:
    • Layer creates a properly styled div container and continues the workflow defined by case 1
adamRenny commented 11 years ago

This should be built after the jQuery Dependency Removal: #19

aaronholsonege commented 11 years ago

Ready for merge: https://github.com/adamRenny/LayerJS/tree/feature/%2352

adamRenny commented 11 years ago

5467fcf8f4b3abd9ba99770abe31be0ff37f65f5