Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Quafadas committed Jul 12, 2023
1 parent 838c22c commit 966f4e0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down
23 changes: 12 additions & 11 deletions calico/src/main/scala/viz/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 966f4e0

Please sign in to comment.