nkovacic / angular-touchspin Goto Github PK
View Code? Open in Web Editor NEWAngular touchspin
License: MIT License
Angular touchspin
License: MIT License
TouchSpinController.prototype.startSpinUp = function () {
var _this = this;
this.checkValue();
if (this.touchSpinOptions.verticalButtons) {
this.decrement(); // **first decrement value here**
} else {
this.increment(); // **first increment value here**
}
this.stopSpin(true);
this.clickStart = Date.now();
this.timeout = this.$timeout(function () {
// if (this.timer) {
// this.$interval.cancel(this.timer);
// }
_this.timer = _this.$interval(function () {
if (_this.touchSpinOptions.verticalButtons) {
_this.decrement(); **// again value decrement here**
} else {
_this.increment(); **// again value increment here**
}
}, _this.touchSpinOptions.stepInterval);
}, this.touchSpinOptions.stepIntervalDelay);
};
Sometimes when I click + or - the number is incremented or decremented double. This is apparent even after the basic configuration. Just click every 0.5 seconds. Here plunker: http://plnkr.co/edit/8c6WnxtisdQlxFyX8tzm?p=preview
I noticed that the options="optionsVariable" passed to the directive not more work with Angular JS 1.6.x
Great library, I use it often. Please add an option to swap the + and - arrows for the horizontal aligned buttons, if possible. Thanks...
How can I send a value after the div has been draw? If I put a value to the var in the controller it is working fine, but when I load it from a web service, it always return 0 because it don't update the number.
Thanks for the help
Hi,
we can not update min max property value on input using touch spin
Regards
karen
Love the touchspin, thanks for great package.
Users are however complaining that the first click always jumps two increments, after that it works fine. The issue is intermittent.
I can confirm that this happens in testing too. When clicking the up arrow once the input would jump from 0 to 2
package.json
includes "types": "./src/angular-touchspin.d.ts",
but that file is not distributed on npm -- it's in the .npmignore
.
It would be nice to have that file included in the distribution so the duplicate typings could be removed from DefinitelyTyped.
I need modify some parameters (step & decimals).
The Bootstrap Touchspin http://www.virtuosoft.eu/code/bootstrap-touchspin/ works fine on an iPhone, if I touch and hold a plus or minus button, the spinner starts spinning.
With angular-touchspin the spinner reacts to click and hold correctly and starts spinning on a browser.
However on an iPhone it does not. It never spins and only increments the value on releasing the touch.
This is a crucial usability issue
I've seen on similar ui components that as you continue to hold the up / down keys, the time it takes to increment the number gets progressively faster. This is really helpful if you are going from say zero to 1000 - it takes a lot less time to get there. You may have already made this possible and I don't know how to set the option, but if not, is there a way to modify it?
Hi there, how can i change the +- buttons color. I have tried to do it manually in angular.touchspin.css file, by adding color: "black", to every group but it doesnot change
If you hold the left mouse button on the touchspin buttons ('+' and '-' or the vertical buttons) and then drag the mouse pointer off the button area, the value of the input will keep increasing (or decreasing), even when you stop pressing the mouse.
The best solution I can think to solve this of is to add a "ng-mouseleave=vm.stopSpin()" into every button tag on the directive html. This way the value will stop changing when you leave the button area.
Booster option does not work, does anyone have the solution?
use a tag for button or button with type="button" otherwise button without type is treated as submit. :(
Seems there is a problem with the latests versions with touch events. Please check these plunkers with Dev Tools Touch events activated in Chrome:
Version 1.8.3 (don't work, 1.8.0 neither)
http://next.plnkr.co/edit/zSzKX6RvDtTM3uWk?preview
Version 1.4.4 (works ok)
http://plnkr.co/edit/8c6WnxtisdQlxFyX8tzm?p=preview
Hi,
I have a simple controller with :
$scope.value = 75;
$scope.options = {
verticalButtons: true,
decimals: 2,
max: 100,
min: 0.1,
step: 0.1
}
And in my html :
<touch-spin ng-model="value" options="options"></touch-spin>
But the spin display 0.1 (minimum value) instead of 75 ? Any ideas ?
Thx.
Hi, I no more be able to compile:
./dev/index.ts
Module build failed: A file specified in tsconfig.json could not be found: /Users/mat/Workspace/git/angular-touchspin/typings/index.d.ts
@ multi main
Path must be a string. Received undefined
Hi,
we have a page with some instances of touchspin and when we edit the input text all models are set with the same value!
can you help me?
Thank you,
Sergio
I didn't see it was possible in the documentation, but it looks like it may be...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.