From 966f4e0cae1f9cc671951632f3bbf48feb2f5bda Mon Sep 17 00:00:00 2001 From: Simon Parten Date: Wed, 12 Jul 2023 22:12:57 +0200 Subject: [PATCH] . --- .github/workflows/ci.yml | 4 ++-- build.sbt | 2 +- calico/src/main/scala/viz/package.scala | 23 ++++++++++++----------- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51c02fc..20a6823 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,11 +90,11 @@ jobs: - name: Make target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') - run: mkdir -p target unidocs/target .js/target myproject-docs/target core/js/target laminar/target jsdocs/target core/jvm/target tests/js/target .jvm/target .native/target generated/js/target tests/jvm/target generated/jvm/target project/target + run: mkdir -p target unidocs/target .js/target myproject-docs/target core/js/target laminar/target jsdocs/target core/jvm/target tests/js/target .jvm/target .native/target generated/js/target tests/jvm/target generated/jvm/target calico/target project/target - name: Compress target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') - run: tar cf targets.tar target unidocs/target .js/target myproject-docs/target core/js/target laminar/target jsdocs/target core/jvm/target tests/js/target .jvm/target .native/target generated/js/target tests/jvm/target generated/jvm/target project/target + run: tar cf targets.tar target unidocs/target .js/target myproject-docs/target core/js/target laminar/target jsdocs/target core/jvm/target tests/js/target .jvm/target .native/target generated/js/target tests/jvm/target generated/jvm/target calico/target project/target - name: Upload target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') diff --git a/build.sbt b/build.sbt index d4e2d62..089df16 100644 --- a/build.sbt +++ b/build.sbt @@ -61,7 +61,7 @@ lazy val generated = crossProject(JVMPlatform, JSPlatform) ) ) -lazy val root = tlCrossRootProject.aggregate(core, generated, laminarIntegration,calicoIntegration, unidocs, tests) +lazy val root = tlCrossRootProject.aggregate(core, generated, laminarIntegration, calicoIntegration, unidocs, tests) lazy val core = crossProject(JVMPlatform, JSPlatform) .in(file("core")) diff --git a/calico/src/main/scala/viz/package.scala b/calico/src/main/scala/viz/package.scala index 96cb90a..6610df5 100644 --- a/calico/src/main/scala/viz/package.scala +++ b/calico/src/main/scala/viz/package.scala @@ -85,20 +85,21 @@ object CalicoViz: val dCheat = d.asInstanceOf[org.scalajs.dom.html.Div] dCheat.style.height = "40vmin" dCheat.style.width = "40vmin" - val p: js.Promise[EmbedResult] = viz.vega.facades.VegaEmbed(d.asInstanceOf[org.scalajs.dom.html.Div], specObj, opts) + val p: js.Promise[EmbedResult] = + viz.vega.facades.VegaEmbed(d.asInstanceOf[org.scalajs.dom.html.Div], specObj, opts) val pIop = IO.fromPromise(IO(p)) (d, pIop.map(_.view)) } - //case (Some(thisDiv), None) => ??? - // This case doesn't work - // thisDiv.flatMap { (d: HtmlDivElement[IO]) => - // val dCheat = d.asInstanceOf[org.scalajs.dom.html.Div] - // dCheat.style.height = "40vmin" - // dCheat.style.width = "40vmin" - // val p: js.Promise[EmbedResult] = viz.vega.facades.VegaEmbed(d.asInstanceOf[org.scalajs.dom.html.Div], specObj, opts) - // val pIop = IO.fromPromise[EmbedResult](IO(p)).toResource - // pIop.map(_.view).map((d, _)) - // } + // case (Some(thisDiv), None) => ??? + // This case doesn't work + // thisDiv.flatMap { (d: HtmlDivElement[IO]) => + // val dCheat = d.asInstanceOf[org.scalajs.dom.html.Div] + // dCheat.style.height = "40vmin" + // dCheat.style.width = "40vmin" + // val p: js.Promise[EmbedResult] = viz.vega.facades.VegaEmbed(d.asInstanceOf[org.scalajs.dom.html.Div], specObj, opts) + // val pIop = IO.fromPromise[EmbedResult](IO(p)).toResource + // pIop.map(_.view).map((d, _)) + // } case _ => ??? // case (Some(thisDiv), None) => // val specObj = JSON.parse(chart.spec).asInstanceOf[js.Object]