tao_ui 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 7e136c86cc51a8855686d7f8b2794f1385fb80e2
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: da267bc319f6db8d62705d74498c359361c1290f
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 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 
     | 
    
         
            -
                    @ 
     | 
| 
      
 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 
     | 
    
         
            -
                    @ 
     | 
| 
      
 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 
     | 
    
         
            -
                    @ 
     | 
| 
      
 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 
     | 
    
         
            -
                    @ 
     | 
| 
      
 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'
         
     | 
    
        data/lib/tao_ui/version.rb
    CHANGED
    
    
    
        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. 
     | 
| 
      
 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- 
     | 
| 
      
 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
         
     |