Skip to content

Instantly share code, notes, and snippets.

@fosskers
Created May 17, 2016 21:30
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save fosskers/cc671b97db314fe310699b1625f68a64 to your computer and use it in GitHub Desktop.
In my emacs, basically all of this code has implicit underlining across the entire screen.
class Backend($: BackendScope[ModelProxy[DisplayModel], Unit]) {
def render(proxy: ModelProxy[DisplayModel]) = {
val x = Array[String]().toVector // This highlights correctly
<.div(
proxy().metadata.render(md => {
<.div(
<.h3("Layer Metadata"),
<.p(s"CellType: ${md.cellType}"),
<.p(s"CRS: ${md.crs}"),
<.div(
<.h4("Layer Extent"),
<.div(
<.p(s"xmin: ${md.extent.xmin}"),
<.p(s"xmin: ${md.extent.ymin}"),
<.p(s"xmin: ${md.extent.xmax}"),
<.p(s"xmin: ${md.extent.ymax}")
)
),
<.h4("Bounds"),
<.div(
<.p(s"MinKey: ${md.bounds.minKey.toString}"),
<.p(s"MaxKey: ${md.bounds.maxKey.toString}")
),
<.div(
<.h4("Layout Definition"),
<.div(
<.h5("Definition Extent"),
<.div(
<.p(s"xmin: ${md.layoutDefinition.extent.xmin}"),
<.p(s"ymin: ${md.layoutDefinition.extent.ymin}"),
<.p(s"xmax: ${md.layoutDefinition.extent.xmax}"),
<.p(s"ymax: ${md.layoutDefinition.extent.ymax}")
),
<.h5("Tile Layout"),
<.div(
<.p(s"Layout cols: ${md.layoutDefinition.tileLayout.layoutCols}"),
<.p(s"Layout rows: ${md.layoutDefinition.tileLayout.layoutRows}"),
<.p(s"Tile cols: ${md.layoutDefinition.tileLayout.tileCols}"),
<.p(s"Tile rows: ${md.layoutDefinition.tileLayout.tileRows}")
)
)
)
)
}),
proxy().attributes.render(attrs => {
<.h3("Extra Attributes")
attrs.attrs.map({ case (k,v) => <.p(s"${k}") })
})
)
}
}
@fosskers
Copy link
Author

2016-05-17-160133_958x1043_scrot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment