Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerhokp committed Aug 4, 2016
1 parent bfa3dec commit 36572b4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 18 deletions.
11 changes: 5 additions & 6 deletions dist/browser.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@ var link = function link(scope, element, attrs) {
};

angular.forEach(PROPS, function (prop) {
attrs.$observe(prop, function (data) {
return config[prop] = data;
return attrs.$observe(prop, function (data) {
config[prop] = data;
if (tooltipInstance) {
tooltipInstance.setOptions(getOpt());
}
});

if (tooltipInstance) {
tooltipInstance.setOptions(getOpt());
}
});

scope.$watch('tooltipEnabled', function (enabled) {
Expand Down
11 changes: 5 additions & 6 deletions dist/directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,12 @@ var link = function link(scope, element, attrs) {
};

angular.forEach(PROPS, function (prop) {
attrs.$observe(prop, function (data) {
return config[prop] = data;
return attrs.$observe(prop, function (data) {
config[prop] = data;
if (tooltipInstance) {
tooltipInstance.setOptions(getOpt());
}
});

if (tooltipInstance) {
tooltipInstance.setOptions(getOpt());
}
});

scope.$watch('tooltipEnabled', function (enabled) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-tether-tooltip",
"version": "1.0.4",
"version": "1.0.5",
"description": "",
"main": "dist/module.js",
"scripts": {
Expand Down
9 changes: 4 additions & 5 deletions src/directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@ const link = (scope, element, attrs) => {
return opt;
}

angular.forEach(PROPS, prop => {
attrs.$observe(prop, data => config[prop] = data);

angular.forEach(PROPS, prop => attrs.$observe(prop, data => {
config[prop] = data;
if (tooltipInstance) {
tooltipInstance.setOptions(getOpt())
tooltipInstance.setOptions(getOpt());
}
});
}));

scope.$watch('tooltipEnabled', enabled => {
if (enabled === undefined || enabled) {
Expand Down

0 comments on commit 36572b4

Please sign in to comment.