angular-help-overlay

WebJar for angular-help-overlay

License

License

MIT
Categories

Categories

Github Development Tools Version Controls Angular User Interface Web Frameworks
GroupId

GroupId

org.webjars.bower
ArtifactId

ArtifactId

github-com-jordanburke-angular-help-overlay
Last Version

Last Version

0.1.2
Release Date

Release Date

Type

Type

jar
Description

Description

angular-help-overlay
WebJar for angular-help-overlay
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/jordanburke/angular-help-overlay

Download github-com-jordanburke-angular-help-overlay

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bower/github-com-jordanburke-angular-help-overlay/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>github-com-jordanburke-angular-help-overlay</artifactId>
    <version>0.1.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/github-com-jordanburke-angular-help-overlay/
implementation 'org.webjars.bower:github-com-jordanburke-angular-help-overlay:0.1.2'
// https://jarcasting.com/artifacts/org.webjars.bower/github-com-jordanburke-angular-help-overlay/
implementation ("org.webjars.bower:github-com-jordanburke-angular-help-overlay:0.1.2")
'org.webjars.bower:github-com-jordanburke-angular-help-overlay:jar:0.1.2'
<dependency org="org.webjars.bower" name="github-com-jordanburke-angular-help-overlay" rev="0.1.2">
  <artifact name="github-com-jordanburke-angular-help-overlay" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='github-com-jordanburke-angular-help-overlay', version='0.1.2')
)
libraryDependencies += "org.webjars.bower" % "github-com-jordanburke-angular-help-overlay" % "0.1.2"
[org.webjars.bower/github-com-jordanburke-angular-help-overlay "0.1.2"]

Dependencies

compile (3)

Group / Artifact Type Version
org.webjars.bower : jquery jar [1.6.0,2.0.0)
org.webjars.bower : chardin.js jar [0.1.3,0.2)
org.webjars.bower : angular jar [1.2.0,)

Project Modules

There are no modules declared in this project.

angular-help-overlay

Angular Wrapper for chardin.js instruction overlay which was inspired by the Gmail composer tour at the time.

Include the angular-help-overlay js file (min or source), chardin.js, and chardin.css. If you are using grunt and using a bowerInstall task, you probably will still need to manually include chardin.js and chardin.css yourself, however the angular-help-overlay should be injected just fine.

Next, install the module to your app:

angular.module('YourApp', ['angularHelpOverlay'])
        ...
});

Usage is straightforward: Find the dom element where you want to the overlay to appear (e.g., body, div, etc.) and add this tag to the element:

<body help-overlay="showHelp">...</body>

With showHelp being a scoped boolean property. Setting that property to true will enable the overlay. Since this is just an AngularJS wrapper around a jquery plugin, this directive still uses chardin.js native attribute lookups:

<div data-intro="Some Help description here" data-position="top">...</div>

data-intro: Text to show with the instructions
data-position: (left, top, right, bottom), where to place the text with respect to the element

Additionally this directive provides delegation of chardin.js start and stop events via, overlay-start-callback and overlay-stop-callback:

<body help-overlay="showHelp" overlay-start-callback="startFn(event)" overlay-stop-callback="stopFn(event)">...</body>

events being passed are the original chardin.js event objects.

Note: The chardin.js attributes will not work on elements that get replaced at compile time, particularly those that are angular directives with replace:true. The workaround for this is to enclose the directive with a simple html wrapper element (e.g., <span> or a <div>) with the chardin.js attributes on it.

The example folder contains a modified example of the original chardin.js (i.e., minus the image animate).

Versions

Version
0.1.2