Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

moved text and img to experimental for now - these need to be updated…

… to the current way of rendering using draw()
  • Loading branch information...
commit c1594aa30e1ac20d185b6623b61c4bbac88f26bd 1 parent 947ee68
@dnewcome authored
Showing with 24 additions and 24 deletions.
  1. +0 −24 donatello.js
  2. +24 −0 experimental.js
View
24 donatello.js
@@ -291,30 +291,6 @@ Donatello.prototype.attr = function( obj ) {
/**
-* Draw text to the scene using a <div> tag.
-*/
-Donatello.prototype.text = function( x, y, str, a ) {
- var el = Donatello.createElement( x, y, null, null, 'div');
- el.innerHTML = str;
- this.dom.appendChild( el );
- var don = new Donatello( el );
- don.attr( a );
- return don;
-}
-
-/**
-* Draw an image to the scene using an <img> tag.
-*/
-Donatello.prototype.image = function( x, y, w, h, img, a ) {
- var el = Donatello.createElement( x, y, w, h, 'img');
- el.src = img;
- this.dom.appendChild( el );
- var don = new Donatello( el );
- don.attr( a );
- return don;
-}
-
-/**
* Internally used method for creating
* and initializing DOM elements.
* name is either tag name of a dom element
View
24 experimental.js
@@ -145,3 +145,27 @@ Donatello.prototype.stop = function( time, attrs ) {
// TODO: this doesn't work how it should
this.attr( {'MozTransition':''});
}
+
+/**
+* Draw text to the scene using a <div> tag.
+*/
+Donatello.prototype.text = function( x, y, str, a ) {
+ var el = Donatello.createElement( x, y, null, null, 'div');
+ el.innerHTML = str;
+ this.dom.appendChild( el );
+ var don = new Donatello( el );
+ don.attr( a );
+ return don;
+}
+
+/**
+* Draw an image to the scene using an <img> tag.
+*/
+Donatello.prototype.image = function( x, y, w, h, img, a ) {
+ var el = Donatello.createElement( x, y, w, h, 'img');
+ el.src = img;
+ this.dom.appendChild( el );
+ var don = new Donatello( el );
+ don.attr( a );
+ return don;
+}
Please sign in to comment.
Something went wrong with that request. Please try again.