tao_ui 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a1c1bccc0ee34c50adb3a33ea9518467baded118
4
- data.tar.gz: c07e17ea24685306501e40b19f482494ce813e9b
3
+ metadata.gz: 7e136c86cc51a8855686d7f8b2794f1385fb80e2
4
+ data.tar.gz: da267bc319f6db8d62705d74498c359361c1290f
5
5
  SHA512:
6
- metadata.gz: 3d1f8a06f43ded1c8cb3ae312dda29362a3d716b87863c96137be5475bb667f2a426104938b3935ea8f6ea386a7b3e4eee96f06d76d4b6a205d9a581163b729f
7
- data.tar.gz: 2e13f7440facfaffd146a524fb45d8c2a53e055eccf482ad530c04f264e0821576a0fbffe8a6420732dcff7eb6e61595e09787d3ec1baa5826c2304d9994f130
6
+ metadata.gz: fa36a0f1c28a1e52189cf4a08ede5ae829768ff0531b66e5ff5e0d9c7ebab3e522ec5b3d12b36a396d246986909bef8dfe09c03faeea395d334551a6c19d34c2
7
+ data.tar.gz: c32087c1b0921fc33f6225c98aa7ea1a074b2122530c4a34083539e78f0b4ec03f1cc2a4ff54855cf6a0b96932649e2bd509e8c555181facbd334828ae1f4ddb
@@ -7,12 +7,9 @@ class Tao.Popover.Position extends TaoModule
7
7
 
8
8
  @option 'offset', type: 'number', default: 0
9
9
 
10
- @property 'arrowOffset', default: 16
11
-
12
10
  _init: ->
13
11
  @top = 0
14
12
  @left = 0
15
- @arrowOffset = 0 unless @withArrow
16
13
 
17
14
  @_setPosition()
18
15
  @_setOffset()
@@ -45,13 +42,25 @@ class Tao.Popover.Position extends TaoModule
45
42
 
46
43
  switch @direction[1]
47
44
  when 'top'
48
- @top = targetOffset.top - popoverHeight + targetHeight - parentOffset.top
45
+ if @withArrow
46
+ @top = targetOffset.top - popoverHeight + targetHeight / 2 + arrowHeight * 1.5 - parentOffset.top
47
+ else
48
+ @top = targetOffset.top - popoverHeight + targetHeight - parentOffset.top
49
49
  when 'bottom'
50
- @top = targetOffset.top - parentOffset.top
50
+ if @withArrow
51
+ @top = targetOffset.top + targetHeight / 2 - arrowHeight * 1.5 - parentOffset.top
52
+ else
53
+ @top = targetOffset.top - parentOffset.top
51
54
  when 'left'
52
- @left = targetOffset.left - popoverWidth + targetWidth - parentOffset.left
55
+ if @withArrow
56
+ @left = targetOffset.left - popoverWidth + targetWidth / 2 + arrowWidth * 1.5 - parentOffset.left
57
+ else
58
+ @left = targetOffset.left - popoverWidth + targetWidth - parentOffset.left
53
59
  when 'right'
54
- @left = targetOffset.left - parentOffset.left
60
+ if @withArrow
61
+ @left = targetOffset.left + targetWidth / 2 - arrowWidth * 1.5 - parentOffset.left
62
+ else
63
+ @left = targetOffset.left - parentOffset.left
55
64
  when 'center'
56
65
  @left = targetOffset.left + targetWidth / 2 - popoverWidth / 2 - parentOffset.left
57
66
  when 'middle'
@@ -2,7 +2,6 @@ table.table {
2
2
  width: 100%;
3
3
  max-width: 100%;
4
4
  border-collapse: collapse;
5
- table-layout: fixed;
6
5
 
7
6
  th {
8
7
  border-top: 1px solid $table-line-color;
@@ -8,6 +8,10 @@ table.table {
8
8
  }
9
9
 
10
10
  .tao-table {
11
+ .table {
12
+ table-layout: fixed;
13
+ }
14
+
11
15
  .th-checkbox,
12
16
  .td-checkbox {
13
17
  display: none;
@@ -1,3 +1,3 @@
1
1
  module TaoUi
2
- VERSION = '0.2.7'
2
+ VERSION = '0.2.8'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tao_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - farthinker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-10 00:00:00.000000000 Z
11
+ date: 2017-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tao_on_rails