Skip to content

Commit

Permalink
fix: remove simple bar cuz it breaks the loading
Browse files Browse the repository at this point in the history
  • Loading branch information
cric96 committed Feb 9, 2024
1 parent eb08e38 commit ce50a8a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 62 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package it.unibo.scafi.js.view.dynamic

import it.unibo.scafi.js.facade.simplebar.SimpleBar
import it.unibo.scafi.js.utils.Tree
import it.unibo.scafi.js.view.HtmlRenderable
import it.unibo.scafi.js.view.dynamic.CarouselModal._
Expand Down Expand Up @@ -65,7 +64,6 @@ case class CarouselModal(carousel: CarouselContent, minBound: Double, innerHeigh
override lazy val html: Element = innerModal.html

innerModal.onClose = () => this.onClose()
SimpleBar.wrap(carouselInner)

override def body: Seq[Element] = innerModal.body

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@ package it.unibo.scafi.js.view.dynamic
import it.unibo.scafi.js.controller.AggregateSystemSupport
import it.unibo.scafi.js.controller.local.DeviceConfiguration.DeviceKind
import it.unibo.scafi.js.controller.local._
import it.unibo.scafi.js.facade.simplebar.SimpleBar
import it.unibo.scafi.js.model.MatrixLed
import it.unibo.scafi.js.model.MatrixLed.MatrixMap
import it.unibo.scafi.js.utils.GlobalStore
import it.unibo.scafi.js.view.dynamic.ConfigurationSection._
import it.unibo.scafi.js.view.static.RootStyle.smallPrimaryBtnClass
import org.scalajs.dom.html.{Button, Div, Select}
import org.scalajs.dom.raw.MouseEvent
import scalatags.JsDom.all._
import upickle.default._

import scala.scalajs.js
import scala.util.{Failure, Success, Try}
Expand Down Expand Up @@ -47,7 +44,7 @@ class ConfigurationSection(configuration: Div, support: AggregateSystemSupport[_
selectMode.onchange = _ => init(getModeFromSelect(selectMode))
loadButton.onclick = _ => load(getModeFromSelect(selectMode))
configuration.appendChild(container)
SimpleBar.wrap(configuration)
container.style = "height: 90%; overflow-x: scroll"

sensors.foreach(sensor => sensor.closeButton.onclick = onRemoveSensor(sensor))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
package it.unibo.scafi.js.view.dynamic
import it.unibo.scafi.js.facade.simplebar.SimpleBar
import org.scalajs.dom.html.Element
import scalatags.JsDom.all._

object ErrorModal extends Modal {
private val text = pre(cls := "overflow-auto text-light", style := "max-height : 50vh").render // init the page
private var bar: SimpleBar = null
override val title: Element = h4(cls := "modal-tile", "Error!").render
override val body: Seq[Element] = Seq(text)
override val footer: Seq[Element] = Seq.empty
override def minBound: Double = 0
def showError(error: String): Unit = {
text.innerHTML = error
bar = SimpleBar.wrap(text) // with hide, the simple bar has some problem... with rewrapping it seems to work
this.toggle()
}
this.appendOnRoot() // put in the page..
onClose = () => {
bar.unMount()
this.hide()
}
}

0 comments on commit ce50a8a

Please sign in to comment.