For easy creation of user editable overlays (over anything you want)
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc
examples
src
styles
tests
.gitignore
README.md
package-lock.json
package.json

README.md

dompack-overlay

Usage

To integrate into your project:

Select a class, eg 'myoverlays', to use for the overlays

The JavaScript part:

import * as dompack from "dompack";
import OverlayManager from "dompack-overlays";

// .....

let overlaymgr = new OverlayManager(mynode, "myoverlay");
overlaymgr.add({ left: 5, top: 50, width: 50, height: 150 });

The SCSS part

@import "~dompack-overlays/styles/mixins";

.myoverlay
{
  @include dompack-overlays;
  @include dompack-overlays-example-styling;
}

API

OverlayManager.add(options)

Add a new overlay. Returns a ResizableOverlay

OverlayManager.getSelection()

Returns the currently selected ResizableOverlays

Events

dompack:overlay-selectionchange

  • bubbles: true
  • cancelable: false

fired when the currently selected ResizableOverlay changes

Development

To run the tests, see https://github.com/WebHare/dompack/blob/develop/doc/testframework.md