jarek-foksa / xel

Xel - Widget toolkit for building native-like Electron and Web apps
https://xel-toolkit.org
Other
679 stars 58 forks source link

x-numberinput – not able to set to "0" #39

Closed sandor closed 3 years ago

sandor commented 6 years ago

I am getting and setting the values for my x-numberinput with JS. Working fine when I get values like 1,2,3 ... 100 etc. (also no problem with negative values. But when I am receiving "0" (zero) the value is not displayed in the x-numberinput. Typing manually "0" in the input ist working. I think I am missing something obvious... ?

jarek-foksa commented 6 years ago

I'm unable to reproduce this bug. Could you please provide some sample code (without framework-specific stuff)?

sandor commented 6 years ago

Sorry Jarek! My big problem is, that I still have to use some framework specific stuff to describe the issue, since I am working with some Fabric.js canvas elements (and as always with AngularJS – sorry!). Recreating a test case without this frameworks will not be of use for my case – especially if you are not able to reproduce the case without using framework stuff.

Not sure if such a case can even be recreated without a framework:

  1. create an object on the canvas with JS and assign a property like 'width' or "angle"
  2. get the specific property (width/angle) and bind it to an x-numberinput in your HTML file so that the width/angle values of the created object are reflected in there
  3. now try to use the a value "0"

Does this making sense?

sandor commented 6 years ago

@jarek-foksa – I have found a solution for this problem. I was writing the specific value like this:

angle: 0,

Writing the value like this will solve the problem:

angle: '0',

You can close the issue if you like – unless it is still relevant...

jarek-foksa commented 6 years ago

As far as I'm concerned, I have no plans for working on issues that require digging into the internals of Angular. But let's keep this open in case someone else is interested in fixing it.

sandor commented 6 years ago

Yeah, it is OK and I understand totally that you don't have any plans (or time) to do something angular specific here. Just hope that it is OK when I post/ask something that is not so clearly Angular specific (or some other stupid stuff that a non-coder like me can ask). So please: if the question or the post is to stupid – just ignore it. :-)

jarek-foksa commented 6 years ago

As long as the issue is somehow related to Xel and states the problem clearly I'm perfectly fine with it. When I ignore a question, it's usually because I don't know the answer.

sandor commented 6 years ago

OK, so we are cool. Just have some patience with me please :-)

jarek-foksa commented 3 years ago

Xel project underwent a major rewrite recently. If you can still reproduce this bug, please report it on https://xel-toolkit.org/issues.