diff options
| -rw-r--r-- | bower.json | 2 | ||||
| -rw-r--r-- | example/index.html | 2 | ||||
| -rw-r--r-- | package.json | 2 | ||||
| -rw-r--r-- | sass/ns-popover.scss | 14 | ||||
| -rw-r--r-- | src/nsPopover.js | 6 | 
5 files changed, 23 insertions, 3 deletions
| @@ -1,6 +1,6 @@  {    "name": "nsPopover", -  "version": "0.5.0", +  "version": "0.5.1",    "homepage": "https://github.com/nohros/nsPopover",    "description": "Popover for angularjs library",    "authors": [ diff --git a/example/index.html b/example/index.html index 00a815a..7b46b64 100644 --- a/example/index.html +++ b/example/index.html @@ -18,7 +18,7 @@    </script>
    <script type="text/ng-template" id="tooltip">
 -    <div class="right-triangle"></div>
 +    <div class="arrow-up"></div>
      <div class="tooltip">
        Cool! The <b>nsPopover</b> could be used as a tooptip.
      </div>
 diff --git a/package.json b/package.json index ebd98da..c093c69 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@  {    "author": "Neylor Ohmaly",    "name": "nsPopover", -  "version": "0.5.0", +  "version": "0.5.1",    "homepage": "http://nohros.com/nsPopover",    "licenses": {      "type": "MIT", diff --git a/sass/ns-popover.scss b/sass/ns-popover.scss index 3c6fdf9..c79e37f 100644 --- a/sass/ns-popover.scss +++ b/sass/ns-popover.scss @@ -23,4 +23,18 @@        }
      }
    }
 +}
 +
 +.ns-popover-tooltip-theme {
 +  box-sizing: border-box;
 +  z-index: 100;
 +  background-color: transparent;
 +
 +  &.ns-popover-center-align {
 +    width: 0;
 +    height: 0;
 +    border-style: none solid solid solid;
 +    border-width: 0 0.3125rem 0.3125rem 0.3125rem;
 +    border-color: #fff transparent transparent transparent;
 +  }
  }
\ No newline at end of file diff --git a/src/nsPopover.js b/src/nsPopover.js index 4cb0779..738ccbf 100644 --- a/src/nsPopover.js +++ b/src/nsPopover.js @@ -100,6 +100,12 @@              $popover.addClass(options.theme);
            }
 +          // Add classes that identifies the pacement and alignment of the popver
 +          // which allows the customization of the popover based on its position.
 +          $popover
 +            .addClass('ns-popover-' + placement_ + '-placement')
 +            .addClass('ns-popover-' + align_ + '-align');
 +
            $timeout(function() {
              $compile($popover)(scope);
            });
 | 
