Skip to content

Commit

Permalink
🐛 Fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
harehare committed Dec 27, 2023
1 parent bd713dd commit e9922c0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
8 changes: 4 additions & 4 deletions frontend/src/elm/Extension/Lib.elm
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import Html.Styled as Html exposing (Html, div)
import Html.Styled.Attributes exposing (style)
import Html.Styled.Lazy exposing (lazy)
import Json.Decode as D
import Models.Color exposing (Color)
import Models.Diagram as DiagramModel
import Models.Diagram.CardSize as CardSize
import Models.Diagram.Data as DiagramData
import Models.Diagram.Scale as Scale
import Models.Diagram.Search as Search
import Models.Diagram.Settings as DiagramSettings
import Models.Diagram.Type as DiagramType
Expand Down Expand Up @@ -38,7 +39,7 @@ type alias InitData =
type alias Model =
{ diagramModel : DiagramModel.Model
, text : String
, backgroundColor : String
, backgroundColor : Color
}


Expand All @@ -63,8 +64,7 @@ init flags =
, data = DiagramData.Empty
, windowSize = ( flags.width, flags.height )
, diagram =
{ size = ( flags.settings.size.width, flags.settings.size.height )
, scale = Scale.fromFloat flags.scale
{ size = ( CardSize.toInt flags.settings.size.width, CardSize.toInt flags.settings.size.height )
, position = ( 0, 0 )
, isFullscreen = False
}
Expand Down
34 changes: 18 additions & 16 deletions frontend/src/elm/Extension/VSCode.elm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import Html.Styled as Html exposing (Html, div)
import Html.Styled.Attributes exposing (style)
import Html.Styled.Lazy exposing (lazy)
import Json.Decode as D
import Models.Color as Color
import Models.Diagram as DiagramModel
import Models.Diagram.CardSize as CardSize
import Models.Diagram.Data as DiagramData
import Models.Diagram.Scale as Scale
import Models.Diagram.Search as Search
Expand Down Expand Up @@ -96,7 +98,6 @@ init flags =
, windowSize = ( 1024, 1024 )
, diagram =
{ size = Size.zero
, scale = Scale.fromFloat 1.0
, position = ( 0, 0 )
, isFullscreen = False
}
Expand All @@ -110,30 +111,31 @@ init flags =
, settings =
{ font = flags.fontName
, size =
{ width = flags.cardWidth
, height = flags.cardHeight
{ width = CardSize.fromInt flags.cardWidth
, height = CardSize.fromInt flags.cardHeight
}
, backgroundColor = flags.backgroundColor
, zoomControl = Just False
, scale = Just 1.0
, backgroundColor = Color.fromString flags.backgroundColor
, zoomControl = Nothing
, scale = Just Scale.default
, color =
{ activity =
{ color = flags.activityColor
, backgroundColor = flags.activityBackgroundColor
{ color = Color.fromString flags.activityColor
, backgroundColor = Color.fromString flags.activityBackgroundColor
}
, task =
{ color = flags.taskColor
, backgroundColor = flags.taskBackgroundColor
{ color = Color.fromString flags.taskColor
, backgroundColor = Color.fromString flags.taskBackgroundColor
}
, story =
{ color = flags.storyColor
, backgroundColor = flags.storyBackgroundColor
{ color = Color.fromString flags.storyColor
, backgroundColor = Color.fromString flags.storyBackgroundColor
}
, line = flags.lineColor
, label = flags.labelColor
, text = Just flags.textColor
, line = Color.fromString flags.lineColor
, label = Color.fromString flags.labelColor
, text = Just <| Color.fromString flags.textColor
}
, toolbar = Just False
, toolbar = Nothing
, lockEditing = Nothing
}
, touchDistance = Nothing
, text = Text.empty
Expand Down

0 comments on commit e9922c0

Please sign in to comment.