Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Commit

Permalink
chore(tooltip): better docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mgcrea committed Jan 13, 2014
1 parent 788270e commit c304c33
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/tooltip/docs/tooltip.demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ <h1 id="tooltips">Tooltips <a class="small" href="//github.com/mgcrea/angular-st
<h2 id="tooltips-examples">Examples</h2>
<p>Add small overlays of content on hover, to any element for housing secondary information.</p>

<div class="callout callout-warning">
<h4>Plugin dependency</h4>
<p>Tooltip require the <a href="//github.com/mgcrea/angular-strap/blob/master/src/helpers/dimensions.js" target="_blank">helpers.dimensions</a> module to be loaded.</p>
</div>

<h3>Live demo <a class="small edit-plunkr" data-module-name="mgcrea.ngStrapDocs" data-content-html-url="tooltip/docs/tooltip.demo.html" data-content-js-url="tooltip/docs/tooltip.demo.js" ng-plunkr data-title="edit in plunker" data-placement="right" bs-tooltip>clog.info</a></h3>
<div class="form-group hide">
<label>Title</label>
Expand Down Expand Up @@ -126,6 +131,7 @@ <h4>This module supports exotic placement options!</h4>
<td>false</td>
<td>
<p>If provided, overrides the default template, can be either a remote URL or a cached template id.</p>
<p>It should be a <code>div.tooltip</code> element following Twitter Bootstrap styles conventions (<a href="//github.com/mgcrea/angular-strap/blob/master/src/tooltip/tooltip.js#L7" target="_blank">like this</a>).</p>
</td>
</tr>
</tbody>
Expand Down
4 changes: 2 additions & 2 deletions src/tooltip/tooltip.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.jqlite.dimensions'])
angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions'])

.run(function($templateCache) {

Expand Down Expand Up @@ -255,7 +255,7 @@ angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.jqlite.dimensions'])
function getPosition() {
if(options.container === 'body') {
return dimensions.offset(element[0]);
} else {
} else {
return dimensions.position(element[0]);
}
}
Expand Down

0 comments on commit c304c33

Please sign in to comment.