Skip to content

Commit

Permalink
Merge pull request #32 from citizennet/API-2709-NEW
Browse files Browse the repository at this point in the history
Add a new directive that prevents value updates
  • Loading branch information
Devgod-1 authored Jan 19, 2023
2 parents ac5bc82 + ded0907 commit 1b8d196
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
11 changes: 11 additions & 0 deletions dist/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,4 +414,15 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
return objectsArray;
}
});

angular.module('cn.util').directive('cnIgnoreWheel', function () {
return {
restrict: 'A',
link: function link(scope, element) {
element.bind('mousewheel', function () {
element[0].blur();
});
}
};
});
})();
2 changes: 1 addition & 1 deletion dist/all.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/all.min.js.map

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions src/cn-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,4 +236,17 @@
return objectsArray;
}
});

angular.module('cn.util')
.directive('cnIgnoreWheel', function () {
return {
restrict: 'A',
link: function (scope, element) {
element.bind('mousewheel', function() {
element[0].blur();
});
}
};
});

})();

0 comments on commit 1b8d196

Please sign in to comment.