Skip to content
Permalink
Browse files

Fixed a bug causing the `ui` to automatically explicitly size the doc…

…ument viewport
  • Loading branch information...
darkfrog26 committed Aug 26, 2019
1 parent 9e62e4f commit f0fcd1774f3b37f1973117bf55d56d7813e251bd
Showing with 3 additions and 2 deletions.
  1. +3 −2 ui/js/src/main/scala/io/youi/component/extras/HTMLComponentSize.scala
@@ -2,17 +2,18 @@ package io.youi.component.extras

import io.youi.component.Component
import io.youi.theme.StringifyImplicits
import io.youi.ui
import org.scalajs.dom.html
import reactify.{Val, Var}

class HTMLComponentSize(override protected val component: Component) extends ComponentSize with StringifyImplicits {
private def e: html.Element = HTMLComponent.element(component)

width.attach { value =>
e.style.width = s"${value.ceil}px"
if (component != ui) e.style.width = s"${value.ceil}px"
}
height.attach { value =>
e.style.height = s"${value.ceil}px"
if (component != ui) e.style.height = s"${value.ceil}px"
}

object view {

0 comments on commit f0fcd17

Please sign in to comment.
You can’t perform that action at this time.