From f7413dc6e3e3fcbd373e9d025b987d74ac30582d Mon Sep 17 00:00:00 2001 From: Leo Horie Date: Wed, 1 Apr 2015 12:31:39 -0400 Subject: [PATCH 1/3] fix svg tests --- tests/svg.html | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tests/svg.html b/tests/svg.html index 6b8c08f4..b57adf93 100644 --- a/tests/svg.html +++ b/tests/svg.html @@ -7,6 +7,7 @@ stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: dash 5s linear alternate infinite; + -webkit-animation: dash 5s linear alternate infinite; } @keyframes dash { @@ -17,6 +18,14 @@ stroke-dashoffset: 0; } } + @-webkit-keyframes dash { + from { + stroke-dashoffset: 1000; + } + to { + stroke-dashoffset: 0; + } + } @@ -26,7 +35,7 @@
  • an HTML link labeled "HTML link"
  • an SVG link labeled "SVG link"
  • a tilted blue square
  • -
  • a cat picture from http://placekitten.com
  • +
  • a cat picture
  • an animated line drawing
  • a clock with the current time
  • @@ -44,8 +53,8 @@ var svg = [ m("text[x=0][y=20]", "SVG Link") ]) ]), - m("svg[height='200px'][width='200px']", [ - m("image[href='http://placekitten.com/200/200'][height='200px'][width='200px'][title='Cat picture']") + m("svg[height='201px'][width='201px']", [ + m("image[href='http://placekitten.com/201/201'][height='200px'][width='200px'][title='Cat picture']") ]), m("svg[enable-background='new 0 0 340 333'][height='333px'][viewBox='0 0 340 333'][width='340px'][x='0px'][y='0px'][title='Line drawings']", [ m("path.path[d='M66.039,133.545c0,0-21-57,18-67s49-4,65,8s30,41,53,27s66,4,58,32s-5,44,18,57s22,46,0,45s-54-40-68-16s-40,88-83,48s11-61-11-80s-79-7-70-41C46.039,146.545,53.039,128.545,66.039,133.545z'][fill='#FFFFFF'][stroke='#000000'][stroke-miterlimit='10'][stroke-width='4']") @@ -78,7 +87,7 @@ var svg = [ m("script", 'var a=new Date,b=parseInt(a.getHours());b=b>12?b-12:b;var c=parseInt(a.getMinutes()),d=parseInt(a.getSeconds()),e=6*d,f=6*(c+d/60),g=30*(b+c/60+d/3600),h=document.getElementById("hour"),i=document.getElementById("minute"),j=document.getElementById("second");h.setAttribute("transform","rotate("+g.toString()+")"),i.setAttribute("transform","rotate("+f.toString()+")"),j.setAttribute("transform","rotate("+e.toString()+")")'), ]), m("svg[height='200px'][width='200px']", [ - m("foreignObject[x=0][y=0][width='100px'][height='100px'][transform='translate(0,0)'']", m('div', {xmlns: "http://www.w3.org/1999/xhtml"}, m.trust('this is a piece of html rendered as SVG foreignObject'))) + m("foreignObject[x=0][y=0][width='100px'][height='100px'][transform='translate(0,0)']", m('div', {xmlns: "http://www.w3.org/1999/xhtml"}, m.trust('this is a piece of html rendered as SVG foreignObject'))) ]) ] From 85894a15361fa3dfbbf7a5317d664418b8bf12fc Mon Sep 17 00:00:00 2001 From: webcss Date: Fri, 3 Apr 2015 22:53:42 +0200 Subject: [PATCH 2/3] Update mithril.md --- docs/mithril.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/mithril.md b/docs/mithril.md index a4483309..e7f1c9bd 100644 --- a/docs/mithril.md +++ b/docs/mithril.md @@ -100,10 +100,12 @@ var links = [ ]; m.render(document.body, [ - m("ul.nav", [ - m("li", links.map(function(link) { - return m("a", {href: link.url}, link.title) - })) + m("ul.nav", + links.map(function(link) { + return m("li", + m("a", {href: link.url}, link.title) + ); + }) ]) ]); ``` From 0273eb13a08537326975d914d8be7daff7b4c1f4 Mon Sep 17 00:00:00 2001 From: Leo Horie Date: Thu, 9 Apr 2015 22:46:13 -0400 Subject: [PATCH 3/3] fix markup of example --- docs/mithril.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/mithril.md b/docs/mithril.md index e7f1c9bd..19f7a706 100644 --- a/docs/mithril.md +++ b/docs/mithril.md @@ -115,11 +115,9 @@ yields: ```markup ```