Permalink
Browse files

updated the demo pages

--HG--
extra : convert_revision : svn%3Afc1ba2b4-ac28-11dd-a772-7fcde58d38e6/trunk%40157
  • Loading branch information...
1 parent 5aa9612 commit bd3878272e2cc91966b2a1590280ee6a31d04045 mihai.sucan@gmail.com committed Jun 26, 2010
Showing with 28 additions and 26 deletions.
  1. +11 −11 demos/demo-tinymce.html
  2. +10 −10 demos/demo1.html
  3. +7 −5 src/paintweb.js
View
@@ -6,7 +6,7 @@
<link rel="author" type="text/html" href="http://www.robodesign.ro"
title="Marius and Mihai Şucan, ROBO Design">
<!-- $URL: http://code.google.com/p/paintweb $
- $Date: 2009-08-20 13:39:59 +0300 $ -->
+ $Date: 2010-06-26 22:58:56 +0300 $ -->
<!-- This demo requires you to have TinyMCE. Please point to your TinyMCE
3 installation. -->
@@ -69,17 +69,17 @@
</textarea></p>
<p>Do you have any feedback to provide? Please <a
- href="http://moodle.org/mod/forum/discuss.php?d=126528">post it over at
- Moodle</a>!</p>
+ href="http://groups.google.com/group/paintweb">post it in the public
+ mailing list</a>!</p>
- <!--[if IE]>
- <p>Please note that this application does not work in Internet Explorer. Any
- other modern browser should work fine. Try <a
- href="http://www.google.com/chrome">Chrome</a>, <a
- href="http://www.mozilla.com">Firefox</a>, <a
- href="http://www.apple.com/safari">Safari</a>, <a
- href="http://www.opera.com">Opera</a> or <a
- href="http://www.konqueror.org">Konqueror</a>)</p>
+ <!--[if lte IE 8]>
+ <p>Please note that this application does not work in Internet Explorer
+ 8. Please try this in Internet Explorer 9, or use any other modern web
+ browser: <a href="http://www.google.com/chrome">Chrome</a>, <a
+ href="http://www.mozilla.com">Firefox</a>, <a
+ href="http://www.apple.com/safari">Safari</a>, <a
+ href="http://www.opera.com">Opera</a> or <a
+ href="http://www.konqueror.org">Konqueror</a>.</p>
<![endif]-->
<!-- vim:set spell spl=en fo=tcroqwanl1 tw=80 ts=2 sw=2 sts=2 sta et ai cin fenc=utf-8 ff=unix: -->
View
@@ -7,7 +7,7 @@
title="Marius and Mihai Şucan, ROBO Design">
<!-- $URL: http://code.google.com/p/paintweb $
- $Date: 2009-08-24 14:14:53 +0300 $ -->
+ $Date: 2010-06-26 22:58:27 +0300 $ -->
</head>
<body>
<h1>PaintWeb simple demo</h1>
@@ -23,17 +23,17 @@
<div id="PaintWebTarget"></div>
<p>Do you have any feedback to provide? Please <a
- href="http://moodle.org/mod/forum/discuss.php?d=126528">post it over at
- Moodle</a>!</p>
+ href="http://groups.google.com/group/paintweb">post it in the public
+ mailing list</a>!</p>
<!--[if lte IE 8]>
- <p>Please note that this application does not work in Internet Explorer. Any
- other modern browser should work fine. Try <a
- href="http://www.google.com/chrome">Chrome</a>, <a
- href="http://www.mozilla.com">Firefox</a>, <a
- href="http://www.apple.com/safari">Safari</a>, <a
- href="http://www.opera.com">Opera</a> or <a
- href="http://www.konqueror.org">Konqueror</a>)</p>
+ <p>Please note that this application does not work in Internet Explorer
+ 8. Please try this in Internet Explorer 9, or use any other modern web
+ browser: <a href="http://www.google.com/chrome">Chrome</a>, <a
+ href="http://www.mozilla.com">Firefox</a>, <a
+ href="http://www.apple.com/safari">Safari</a>, <a
+ href="http://www.opera.com">Opera</a> or <a
+ href="http://www.konqueror.org">Konqueror</a>.</p>
<![endif]-->
<script type="text/javascript" src="../build/paintweb.js"></script>
View
@@ -17,7 +17,7 @@
* along with PaintWeb. If not, see <http://www.gnu.org/licenses/>.
*
* $URL: http://code.google.com/p/paintweb $
- * $Date: 2010-06-26 22:10:14 +0300 $
+ * $Date: 2010-06-26 22:44:23 +0300 $
*/
/**
@@ -2476,22 +2476,24 @@ function PaintWeb (win, doc) {
bufferCanvas.width = layerCanvas.width = importImage.width;
bufferCanvas.height = layerCanvas.height = importImage.height;
+ bufferStyle.width = layerStyle.width = styleWidth + 'px';
+ bufferStyle.height = layerStyle.height = styleHeight + 'px';
try {
layerContext.drawImage(importImage, 0, 0);
} catch (err) {
result = false;
bufferCanvas.width = layerCanvas.width = image.width;
bufferCanvas.height = layerCanvas.height = image.height;
+ styleWidth = image.width * image.canvasScale;
+ styleHeight = image.height * image.canvasScale;
+ bufferStyle.width = layerStyle.width = styleWidth + 'px';
+ bufferStyle.height = layerStyle.height = styleHeight + 'px';
}
if (result) {
image.width = importImage.width;
image.height = importImage.height;
- // FIXME: MSIE 9 clears the Canvas element when you change the
- // elem.style.width/height... *argh*
- bufferStyle.width = layerStyle.width = styleWidth + 'px';
- bufferStyle.height = layerStyle.height = styleHeight + 'px';
_self.config.imageLoad = importImage;
this.events.dispatch(new appEvent.imageSizeChange(image.width,

0 comments on commit bd38782

Please sign in to comment.