Skip to content

Commit 689b20a

Browse files
committed
only css
1 parent 80ba0a5 commit 689b20a

6 files changed

+115
-72
lines changed

dist/angular-tooltips.css

+69-58
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angular-tooltips.css.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angular-tooltips.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,9 @@
177177

178178
toReturn = [
179179
'<tooltip ' + attributes + ' class="tooltips">',
180-
'<tip-cont>',
181-
tooltippedContent.text,
182-
'</tip-cont>'
180+
//'<tip-cont>',
181+
tooltippedContent.text//,
182+
//'</tip-cont>'
183183
];
184184
if (tooltipTemplate ||
185185
isTemplateUrl) {
@@ -198,25 +198,25 @@
198198
return toReturn.join(' ');
199199
}
200200
, calculateTop = function calculateTop(theTipElement, theTipContElement) {
201-
var top = -Math.floor(theTipElement[0].offsetHeight + marginTooltipArrow)
201+
/*var top = -Math.floor(theTipElement[0].offsetHeight + marginTooltipArrow)
202202
, left = Math.floor(theTipContElement[0].offsetWidth / 2 - theTipElement[0].offsetWidth / 2);
203203
204204
theTipElement.css({
205205
'top': top - defaultTipTolleranceMargin + 'px',
206206
'left': left + 'px'
207-
});
207+
});*/
208208
}
209209
, calculateLeft = function calculateLeft(theTipElement, theTipContElement) {
210-
var bottom = Math.floor(-theTipElement[0].offsetHeight / 2 + theTipContElement[0].offsetHeight / 2)
210+
/*var bottom = Math.floor(-theTipElement[0].offsetHeight / 2 + theTipContElement[0].offsetHeight / 2)
211211
, left = -Math.floor(theTipElement[0].offsetWidth + marginTooltipArrow);
212212
213213
theTipElement.css({
214214
'top': bottom + 'px',
215215
'left': left - defaultTipTolleranceMargin + 'px'
216-
});
216+
});*/
217217
}
218218
, calculateBottom = function calculateBottom(theTipElement, theTipContElement) {
219-
var tipStyle
219+
/*var tipStyle
220220
, paddingTop
221221
, left = Math.floor(theTipContElement[0].offsetWidth / 2 - theTipElement[0].offsetWidth / 2)
222222
, top;
@@ -235,16 +235,16 @@
235235
theTipElement.css({
236236
'top': top + defaultTipTolleranceMargin + 'px',
237237
'left': left + 'px'
238-
});
238+
});*/
239239
}
240240
, calculateRight = function calculateRight(theTipElement, theTipContElement) {
241-
var bottom = Math.floor(-theTipElement[0].offsetHeight / 2 + theTipContElement[0].offsetHeight / 2)
241+
/*var bottom = Math.floor(-theTipElement[0].offsetHeight / 2 + theTipContElement[0].offsetHeight / 2)
242242
, left = theTipContElement[0].offsetWidth + marginTooltipArrow;
243243
244244
theTipElement.css({
245245
'bottom': bottom + 'px',
246246
'left': left + defaultTipTolleranceMargin + 'px'
247-
});
247+
});*/
248248
}
249249
, isOutOfPage = function isOutOfPage(theTipElement) {
250250

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
(function commonJS(require, module) {
33
'use strict';
44

5-
require('./src/js/angular-tooltips');
5+
require('./src/lib/angular-tooltips');
66

77
module.exports = '720kb.tooltips';
88
}(require, module));

lib/angular-tooltips.scss

+17-1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ $tooltip-medium-transition: .35s;
5858
opacity: 1;
5959
}
6060
}
61+
position: relative;
6162

6263
._large {
6364

@@ -91,7 +92,6 @@ $tooltip-medium-transition: .35s;
9192
}
9293

9394
&.tooltips {
94-
position: relative;
9595

9696
tip {
9797
@include border-radius($tooltip-border-radius);
@@ -139,6 +139,10 @@ $tooltip-medium-transition: .35s;
139139

140140
tip {
141141

142+
left: 50%;
143+
top: -$margin-tooltip-arrow;
144+
transform: translateX(-50%) translateY(-100%);
145+
142146
tip-arrow {
143147
border-left: 6px solid transparent;
144148
border-right: 6px solid transparent;
@@ -158,6 +162,10 @@ $tooltip-medium-transition: .35s;
158162

159163
tip {
160164

165+
right: 50%;
166+
top: 100%;
167+
transform: translateY($margin-tooltip-arrow) translateX(50%);
168+
161169
tip-arrow {
162170
border-bottom: 6px solid $tooltip-background-color;
163171
border-left: 6px solid transparent;
@@ -177,6 +185,10 @@ $tooltip-medium-transition: .35s;
177185

178186
tip {
179187

188+
left: 100%;
189+
top: 50%;
190+
transform: translateX($margin-tooltip-arrow) translateY(-50%);
191+
180192
tip-arrow {
181193
border-bottom: 6px solid transparent;
182194
border-right: 6px solid $tooltip-background-color;
@@ -196,6 +208,10 @@ $tooltip-medium-transition: .35s;
196208

197209
tip {
198210

211+
left: -$margin-tooltip-arrow;
212+
top: 50%;
213+
transform: translateX(-100%) translateY(-50%);
214+
199215
tip-arrow {
200216
border-bottom: 6px solid transparent;
201217
border-left: 6px solid $tooltip-background-color;

tasks/bower-version-bump

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#! /usr/bin/env node
2+
// -*- js -*-
3+
4+
/*global require,JSON*/
5+
(function setUp(require, JSON) {
6+
'use strict';
7+
8+
var npmConf = require('../package.json')
9+
, bowerConf = require('../bower.json')
10+
, fs = require('fs')
11+
, newBowerConf;
12+
13+
bowerConf.version = npmConf.version;
14+
newBowerConf = JSON.stringify(bowerConf, null, 2);
15+
fs.writeFileSync('bower.json', newBowerConf);
16+
}(require, JSON));

0 commit comments

Comments
 (0)