0.0.21 • Published 6 years ago

html-overlays v0.0.21

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

html-overlays

HTML overlays clones a given a element (and its ancestors) under a different root. This allows correct styling to be applied to an element, even if not rendered under the same html sub-tree.

Overlay Manager

Manages the overlay layer using a given context.

createOverlay(overlayContext:Element)

Clones overlayContext onto a new layer. It returns some useful stuff (see below)

Example:

//constructor creates the overlay layer which will house the clones:
const overlayManager = new OverlayManager(document.body);

//createOverlay clones the popup (an HTMLElement) 
const {layer,           // the cloned layer created (ancestors top)
        target,         // the clone of overlayContext
        parentTarget,   // parent of target
        destroy         //a function which, when called, destroys the created layer
} = overlayManager.createOverlay(popup);

destroy();
0.0.21

6 years ago

0.0.20

6 years ago

0.0.19

6 years ago

0.0.18

6 years ago

0.0.17

6 years ago

0.0.16

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago