diff --git a/.hsdoc b/.hsdoc index 9e45e327..847df1dd 100644 --- a/.hsdoc +++ b/.hsdoc @@ -1,6 +1,6 @@ name: "Tether" description: "Marrying DOM elements for life" +domain: "tether.io" source: "coffee/*.coffee" examples: "**/*.md" -assets: "{deps/*,*.js,*.coffee,css/*.css,docs/css/*.css,docs/js/*,js,docs/welcome/*,examples/*}" -domain: "tether.io" +assets: "{dist/js/*.js,dist/css/*.css,docs/css/*.css,docs/js/*,js,docs/welcome/*,examples/*}" diff --git a/docs/intro.md b/docs/intro.md index 70c0a4b9..c1fd45fb 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -1,5 +1,5 @@ - - + + diff --git a/docs/js/markAttachment.js b/docs/js/markAttachment.js new file mode 100644 index 00000000..c7d34f08 --- /dev/null +++ b/docs/js/markAttachment.js @@ -0,0 +1,51 @@ +/* globals Tether */ + +'use strict'; + +Tether.modules.push({ + initialize: function initialize() { + var _this = this; + + this.markers = {}; + + ['target', 'element'].forEach(function (type) { + var el = document.createElement('div'); + el.className = _this.getClass('' + type + '-marker'); + + var dot = document.createElement('div'); + dot.className = _this.getClass('marker-dot'); + el.appendChild(dot); + + _this[type].appendChild(el); + + _this.markers[type] = { dot: dot, el: el }; + }); + }, + + position: function position(_ref) { + var manualOffset = _ref.manualOffset; + var manualTargetOffset = _ref.manualTargetOffset; + + var offsets = { + element: manualOffset, + target: manualTargetOffset + }; + + for (var type in offsets) { + var offset = offsets[type]; + for (var side in offset) { + var val = offset[side]; + var notString = typeof val !== 'string'; + if (notString || val.indexOf('%') === -1 && val.indexOf('px') === -1) { + val += 'px'; + } + + if (this.markers[type].dot.style[side] !== val) { + this.markers[type].dot.style[side] = val; + } + } + } + + return true; + } +}); diff --git a/docs/welcome/browser-demo.html b/docs/welcome/browser-demo.html index 4915b778..f6fdea41 100644 --- a/docs/welcome/browser-demo.html +++ b/docs/welcome/browser-demo.html @@ -10,10 +10,10 @@ - + - +
@@ -66,11 +66,11 @@
- + - - - + + + diff --git a/docs/welcome/index.html b/docs/welcome/index.html index f604763b..f88d7efe 100644 --- a/docs/welcome/index.html +++ b/docs/welcome/index.html @@ -10,11 +10,11 @@ - + - - + + @@ -105,7 +105,7 @@

Play with Tether

Interact with this demo.

 

-

To learn more, check out our documentation.

+

To learn more, check out our documentation.

@@ -119,22 +119,22 @@

Play with Tether

Tether Family

These projects are all powered by Tether's positioning engine.

- +

Drop

Create dropdowns, popovers, and more.

- +

Tooltip

Stylable tooltips built on Tether.

- +

Select

Stylable select elements built on Tether.

- +

Shepherd

Guide your users through a tour of your app.

@@ -194,13 +194,13 @@

Help us spread the word.

- + - - - - + + + + + +
diff --git a/examples/element-scroll/index.html b/examples/element-scroll/index.html index 1eb6f1e3..0cb950be 100644 --- a/examples/element-scroll/index.html +++ b/examples/element-scroll/index.html @@ -441,7 +441,7 @@ } - + + + + + + + +