back-porting the corrections I needed to make to take advantage of load-script, as well as correctly sending string rather than naked id to the call to the Raphael JS library
This commit is contained in:
parent
2abca33a81
commit
83f6db4211
|
@ -6,15 +6,13 @@
|
||||||
; This is a small demonstration of the Javascript
|
; This is a small demonstration of the Javascript
|
||||||
; graphics library Raphael from http://raphaeljs.com/ .
|
; graphics library Raphael from http://raphaeljs.com/ .
|
||||||
|
|
||||||
; Include the small script in raphael-script.js to load Rapahel (old version 1.5.2).
|
|
||||||
; racket ../../whalesong.rkt build --include-script raphael-script.js raphael-demo.rkt
|
|
||||||
|
|
||||||
; The example below the bindings draws a Lissajous curve.
|
; The example below the bindings draws a Lissajous curve.
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; Whalesong binding of Raphael
|
;;; Whalesong binding of Raphael
|
||||||
;;;
|
;;;
|
||||||
|
(load-script "http://yandex.st/raphael/1.5.2/raphael.js")
|
||||||
|
|
||||||
(define paper #f)
|
(define paper #f)
|
||||||
|
|
||||||
|
@ -22,7 +20,7 @@
|
||||||
(unless paper
|
(unless paper
|
||||||
(set! paper
|
(set! paper
|
||||||
(js-eval
|
(js-eval
|
||||||
(format "Raphael(~a, ~a, ~a)"
|
(format "Raphael(~s, ~a, ~a)"
|
||||||
id width height)))))
|
id width height)))))
|
||||||
|
|
||||||
(define (raphael-rect x1 y1 x2 y2 . more)
|
(define (raphael-rect x1 y1 x2 y2 . more)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user