Pretty happy with the outcome

Pretty happy with my calculator if I do say so myself. Penny for your thoughts.

Calculating awesomeness

1 Like

Looks pretty awesome :smiley:
But you should try to make the buttons text unselectable so they will feel more like “buttons”.
See what I mean

1 Like

I agree, noticed that when i was playing with it, it is very annoying. Never thought about making the text unselectable, thanks for the good advice.

Looks quite lovely!

One funny thing I noticed, if you click on a button, drag the cursor off it, and release the mouse button, the calc button will remain stuck, due to the way you handle clicks (with onmousedown and onmouseup). I think using the :active pseudoclass is simpler, and wouldn’t have this particular quirk.

From the functionality side, I’m not so sure about showing values such as Infinity. Calculators tend to error out and lock up when dividing by 0, so Infinity that you can continue piling operations on is a little weird. Especially when you multiply it by 0 next, which clears the display without telling what’s going on (if you’d rather keep the Infinity, then I think you should show NaN as well - then it would be consistent).

Thanks for the feedback, it’s these little things that make the difference. Originally my only issue with the buttons was the issue @akacipher pointed out, which I’ve yet to rectify (never enough time in the day), now as you have rightly noted there is the issue with the stuck button. Being a hobbyist coder it’s not something I’ve yet had to think about, but obviously testing is a vital stage of any project and one which is presumably not undertaken by those that created it.

Regarding the functionality issue, when I started this project, my first thoughts were with just getting the damn thing to do a simple calcualtion and then build it up from there, therefore I think my coding for this part has possibly let me down and could do with refining. On reflection, I’d have been better off initially thinking more about how the calculator should function and what to expect from certain results, rather than aesthetics.

Once again thanks for your input, it’s greatly appreciated and I shall look at the issue you raised in more detail and decide on how I want this to evaluate, interestingly Infinity isn’t something I coded in knowingly, it was simply the output Javascript returned.