2015-04-16 20:43 GMT+02:00 Bert Freudenberg bert@freudenbergs.de:
On 16.04.2015, at 11:33, Nicolai Hess nicolaihess@web.de wrote:
2015-04-16 20:18 GMT+02:00 Bert Freudenberg bert@freudenbergs.de:
On 15.04.2015, at 23:53, Nicolai Hess nicolaihess@web.de wrote:
2015-04-15 23:53 GMT+02:00 Bert Freudenberg bert@freudenbergs.de:
No idea, but just as a datapoint:
The code works fine in SqueakJS (if you enlarge the form to actually
show the ellipse centered at 400@400):
<PastedGraphic-8.png>
Also no idea why the gradient repeats after 260 pixels ...
This looks like some "wrap-around" , what happens if the fill is in the
upper left
quarter? will the fill appear 4 times?
It appears to repeat vertically only.
You can easily try it for yourself. Just go to this URL, open a workspace, and paste your code in:
That is not really easy:) I can not copy and paste into squeakjs. And with german keyboard layout I can not even tpye an @ sign. (Firefox on Windows 7)
Does copy and paste work for other systems / browser?
Ah, Chrome works best so far. Sorry. Patches welcome ;^)
Hi Bert,
following observation:
in squeak.js, document.onkeypress = function(evt) { if (!display.vm) return true; // check for ctrl-x/c/v/r if (/[CXVR]/.test(String.fromCharCode(evt.charCode + 64)))
this test never holds (at least not with firefox on windows). The charCode is always the same, regardless whether ctrl-key is pressed or not, so it always handles those shortcuts as squeak-shortcuts (ctrl+v is handled as "paste author initials", not as "paste text to browser window") (this is not an issue for chrome, because it does not use keypress, but the keydown events for cut&paste)
changing this to
if (evt.ctrlKey && /[cxvr]/.test(String.fromCharCode(evt.charCode))) makes it working.
another issue is, that in firefox on windows, the "paste event" is never fired for non-editable htmlelements (it works for textareas and inputfields). But we can make the whole document "editable" with document.body.contentEditable = true (maybe it is enough to do this for the canvas elemement).
with this changes, copy , cut & paste are working in firefox (only tested on windows).
about typing '@' sign with german keyboard layout, I commented at the bugtracker issue https://github.com/bertfreudenberg/SqueakJS/issues/24
nicolai
How would JS react on a wrong array access? Throwing an exception?
No. It's just a no-op.
- Bert -
- Bert -