diff options
author | Sébastien Doeraene <sjrdoeraene@gmail.com> | 2015-01-29 17:50:33 +0100 |
---|---|---|
committer | Sébastien Doeraene <sjrdoeraene@gmail.com> | 2015-01-29 17:50:33 +0100 |
commit | 33129113b3ebf3dd656bd58c34af476fb852e2f6 (patch) | |
tree | 5b84193ecd9eefc05bd9f27b1766e833064182ae /examples/demos | |
parent | ea067baf2afe492cde8b10b88e9628812cb4d7cd (diff) | |
download | hands-on-scala-js-33129113b3ebf3dd656bd58c34af476fb852e2f6.tar.gz hands-on-scala-js-33129113b3ebf3dd656bd58c34af476fb852e2f6.tar.bz2 hands-on-scala-js-33129113b3ebf3dd656bd58c34af476fb852e2f6.zip |
Upgrade and update the whole thing for Scala.js 0.6.0-RC2.
Both the builds, as well as the text of the book, have been
completely updated for Scala.js 0.6.x.
Diffstat (limited to 'examples/demos')
-rw-r--r-- | examples/demos/build.sbt | 12 | ||||
-rw-r--r-- | examples/demos/src/main/scala/scrollmenu/Controller.scala | 2 | ||||
-rw-r--r-- | examples/demos/src/main/scala/scrollmenu/ScrollSpy.scala | 2 |
3 files changed, 7 insertions, 9 deletions
diff --git a/examples/demos/build.sbt b/examples/demos/build.sbt index 0db3dec..7b0d9e1 100644 --- a/examples/demos/build.sbt +++ b/examples/demos/build.sbt @@ -1,8 +1,6 @@ -import scalajs.sbtplugin.ScalaJSPlugin.ScalaJSKeys._ - (emitSourceMaps in fullOptJS) := false -scalaJSSettings +enablePlugins(ScalaJSPlugin) name := "Example" @@ -12,12 +10,12 @@ scalaVersion := "2.11.4" libraryDependencies += "com.lihaoyi" %% "acyclic" % "0.1.2" % "provided" -libraryDependencies += "com.lihaoyi" %%% "upickle" % "0.2.5" +libraryDependencies += "com.lihaoyi" %%% "upickle" % "0.2.6-RC1" -libraryDependencies += "org.scala-lang.modules.scalajs" %%% "scalajs-dom" % "0.6" +libraryDependencies += "org.scala-js" %%% "scalajs-dom" % "0.7.0" -libraryDependencies += "com.scalatags" %%% "scalatags" % "0.4.2" +libraryDependencies += "com.lihaoyi" %%% "scalatags" % "0.4.3-RC1" -libraryDependencies += "com.scalarx" %%% "scalarx" % "0.2.6" +libraryDependencies += "com.lihaoyi" %%% "scalarx" % "0.2.7-RC1" libraryDependencies += "org.scala-lang.modules" %% "scala-async" % "0.9.2"
\ No newline at end of file diff --git a/examples/demos/src/main/scala/scrollmenu/Controller.scala b/examples/demos/src/main/scala/scrollmenu/Controller.scala index b56da31..cfef7b0 100644 --- a/examples/demos/src/main/scala/scrollmenu/Controller.scala +++ b/examples/demos/src/main/scala/scrollmenu/Controller.scala @@ -23,7 +23,7 @@ object Controller{ val Seq(main, menu, layout, menuLink) = Seq( "main", "menu", "layout", "menuLink" - ).map(dom.document.getElementById) + ).map(dom.document.getElementById(_).asInstanceOf[dom.HTMLElement]) val snippets = dom.document.getElementsByClassName("highlight-me") diff --git a/examples/demos/src/main/scala/scrollmenu/ScrollSpy.scala b/examples/demos/src/main/scala/scrollmenu/ScrollSpy.scala index f0b9dd4..9a64314 100644 --- a/examples/demos/src/main/scala/scrollmenu/ScrollSpy.scala +++ b/examples/demos/src/main/scala/scrollmenu/ScrollSpy.scala @@ -57,7 +57,7 @@ class ScrollSpy(structure: Tree[String], } js.Array( - menuItems.map(name => dom.document.getElementById(Controller.munge(name))) + menuItems.map(name => dom.document.getElementById(Controller.munge(name)).asInstanceOf[dom.HTMLElement]) .map((el) => () => offset(el, main)):_* ) } |