update documentation

dev
Jens Mönig 2015-12-21 16:06:47 +01:00
rodzic 165c1b4ee6
commit 6170e32248
2 zmienionych plików z 34 dodań i 24 usunięć

Wyświetl plik

@ -153,7 +153,7 @@
IV. open issues
----------------
- clipboard support (copy & paste)
- clipboard support (copy & paste) for non-textual data
- native (unscaled) high-resolution display support
@ -169,10 +169,11 @@
- Chrome for Windows
- Chrome for Mac
- Chrome for Android
- Safari for Windows
- Safari for Windows (deprecated)
- safari for Mac
- Safari for iOS (mobile)
- IE for Windows
- Edge for Windows
- Opera for Windows
- Opera for Mac
@ -262,10 +263,11 @@
window.onload = function () {
world = new WorldMorph(
document.getElementById('world'));
setInterval(loop, 50);
loop();
};
function loop() {
requestAnimationFrame(loop);
world.doOneCycle();
}
</script>
@ -309,10 +311,11 @@
document.getElementById('world1'), false);
world2 = new WorldMorph(
document.getElementById('world2'), false);
setInterval(loop, 50);
loop();
};
function loop() {
requestAnimationFrame(loop);
world1.doOneCycle();
world2.doOneCycle();
}
@ -377,10 +380,11 @@
x = 0;
y += 1;
}
setInterval(loop, 50);
loop();
};
function loop() {
requestAnimationFrame(loop);
world.doOneCycle();
}
</script>
@ -1043,6 +1047,7 @@
background texture handling, countless bug fixes and optimizations.
Ian Reynolds contributed backspace key handling for Chrome.
Davide Della Casa contributed performance optimizations for Firefox.
Jason N (@cyderize) contributed native copy & paste for text editing.
- Jens Mönig
*/
@ -1052,7 +1057,7 @@
/*global window, HTMLCanvasElement, getMinimumFontHeight, FileReader, Audio,
FileList, getBlurredShadowSupport*/
var morphicVersion = '2015-December-15';
var morphicVersion = '2015-December-21';
var modules = {}; // keep track of additional loaded modules
var useBlurredShadows = getBlurredShadowSupport(); // check for Chrome-bug
@ -4498,17 +4503,17 @@ CursorMorph.prototype.init = function (aStringOrTextMorph) {
this.gotoSlot(this.slot);
// Add hidden text box for copying and pasting
this.hiddenText = document.createElement('textarea');
this.hiddenText.style.position = 'absolute';
this.hiddenText.style.right = '101%'; // placed just out of view
this.clipboardHandler = document.createElement('textarea');
this.clipboardHandler.style.position = 'absolute';
this.clipboardHandler.style.right = '101%'; // placed just out of view
document.body.appendChild(this.hiddenText);
document.body.appendChild(this.clipboardHandler);
this.hiddenText.value = this.target.selection();
this.hiddenText.focus();
this.hiddenText.select();
this.clipboardHandler.value = this.target.selection();
this.clipboardHandler.focus();
this.clipboardHandler.select();
this.hiddenText.addEventListener(
this.clipboardHandler.addEventListener(
'keypress',
function (event) {
myself.processKeyPress(event);
@ -4518,7 +4523,7 @@ CursorMorph.prototype.init = function (aStringOrTextMorph) {
false
);
this.hiddenText.addEventListener(
this.clipboardHandler.addEventListener(
'keydown',
function (event) {
myself.processKeyDown(event);
@ -4535,7 +4540,7 @@ CursorMorph.prototype.init = function (aStringOrTextMorph) {
false
);
this.hiddenText.addEventListener(
this.clipboardHandler.addEventListener(
'input',
function (event) {
if (this.value === '') {
@ -4898,8 +4903,8 @@ CursorMorph.prototype.destroy = function () {
this.target.drawNew();
this.target.changed();
}
if (this.hiddenText) {
document.body.removeChild(this.hiddenText);
if (this.clipboardHandler) {
document.body.removeChild(this.clipboardHandler);
}
CursorMorph.uber.destroy.call(this);
};

Wyświetl plik

@ -9,7 +9,7 @@
Copyright (C) 2015 by Jens Mönig
this documentation last changed: Sep 23, 2015
this documentation last changed: Dec 21, 2015
This file is part of Snap!.
@ -154,7 +154,7 @@
IV. open issues
----------------
- clipboard support (copy & paste)
- clipboard support (copy & paste) for non-textual data
- native (unscaled) high-resolution display support
@ -170,10 +170,11 @@
- Chrome for Windows
- Chrome for Mac
- Chrome for Android
- Safari for Windows
- Safari for Windows (deprecated)
- safari for Mac
- Safari for iOS (mobile)
- IE for Windows
- Edge for Windows
- Opera for Windows
- Opera for Mac
@ -263,10 +264,11 @@
window.onload = function () {
world = new WorldMorph(
document.getElementById('world'));
setInterval(loop, 50);
loop();
};
function loop() {
requestAnimationFrame(loop);
world.doOneCycle();
}
</script>
@ -310,10 +312,11 @@
document.getElementById('world1'), false);
world2 = new WorldMorph(
document.getElementById('world2'), false);
setInterval(loop, 50);
loop();
};
function loop() {
requestAnimationFrame(loop);
world1.doOneCycle();
world2.doOneCycle();
}
@ -378,10 +381,11 @@
x = 0;
y += 1;
}
setInterval(loop, 50);
loop();
};
function loop() {
requestAnimationFrame(loop);
world.doOneCycle();
}
</script>
@ -1044,5 +1048,6 @@
background texture handling, countless bug fixes and optimizations.
Ian Reynolds contributed backspace key handling for Chrome.
Davide Della Casa contributed performance optimizations for Firefox.
Jason N (@cyderize) contributed native copy & paste for text editing.
- Jens Mönig