Skip to content

Instantly share code, notes, and snippets.

@ToddG
Created July 4, 2011 17:06
Show Gist options
  • Save ToddG/1063628 to your computer and use it in GitHub Desktop.
Save ToddG/1063628 to your computer and use it in GitHub Desktop.
ordering issues w/wiring in nitrogen
%% -*- mode: nitrogen -*-
-module (myraphaelpage).
-compile(export_all).
-include_lib("nitrogen_core/include/wf.hrl").
-include_lib("nitrogen_core/include/google_chart.hrl").
-include("records.hrl").
main() -> #template { file="./site/templates/raphael.html" }.
title() -> "Todd's <b>Raphael</b> Page".
body() ->
%%wf:wire(#alert { text="Hello, World!" }),
#panel { style="margin: 50px 100px;", body=[
#span { text="Raphael Test" },
#panel {id="holder", body=[
#image { id="photo", image="test-poster.png", alt="Test" }
]}
]}
, wf:wire(#alert { text="Hello, World!" })
%% ,
%% wf:wire(#script { script="var img = document.getElementById('photo');
%% img.style.display = 'none';
%% var r = Raphael('holder', 600, 540);
%%
%% r.image(img.src, 140, 140, 320, 240);
%% r.image(img.src, 140, 380, 320, 240).scale(1, -1).attr({opacity: .5});
%% r.rect(0, 380, 600, 160).attr({gradient: '90-#000-#000', opacity: .5});" })
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment