Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

Commit

Permalink
feat: add an opacity slider to map tiles (#138)
Browse files Browse the repository at this point in the history
* add slider ui type, add opacity to tile

* Add description

* update manifest "title"'s to keep consistent
  • Loading branch information
KaWaite authored May 10, 2022
1 parent 2c02203 commit 4f72b87
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 28 deletions.
27 changes: 14 additions & 13 deletions internal/adapter/gql/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions internal/adapter/gql/gqlmodel/convert_property.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@ func ToPropertySchemaFieldUI(ui *property.SchemaFieldUI) *PropertySchemaFieldUI
ui2 = PropertySchemaFieldUIColor
case property.SchemaFieldUIRange:
ui2 = PropertySchemaFieldUIRange
case property.SchemaFieldUISlider:
ui2 = PropertySchemaFieldUISlider
case property.SchemaFieldUIImage:
ui2 = PropertySchemaFieldUIImage
case property.SchemaFieldUIVideo:
Expand Down
6 changes: 4 additions & 2 deletions internal/adapter/gql/gqlmodel/models_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 20 additions & 12 deletions pkg/builtin/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ extensions:
description: Show elevation when close to the surface.
- id: terrainType
type: string
title: Terrain Type
title: Terrain type
description: Specify terrain type.
defaultValue: cesium
choices:
Expand Down Expand Up @@ -89,7 +89,7 @@ extensions:
description: Enable camera limiter.
- id: cameraLimitterShowHelper
type: bool
title: Show Helper
title: Show helper
defaultValue: false
description: Display the limiter boundaries.
- id: cameraLimitterTargetArea
Expand Down Expand Up @@ -118,7 +118,7 @@ extensions:
fields:
- id: tile_type
type: string
title: Tile Type
title: Tile type
defaultValue: default
choices:
- key: default
Expand Down Expand Up @@ -158,6 +158,14 @@ extensions:
title: Maximum zoom level
min: 0
max: 30
- id: tile_opacity
type: number
title: Opacity
description: "Change the opacity of the selected tile map. Min: 0 Max: 1"
defaultValue: 1
ui: slider
min: 0
max: 1
- id: theme
title: Publish Theme
description: Set your theme.
Expand Down Expand Up @@ -248,20 +256,20 @@ extensions:
max: 1
- id: brightness_shift
type: number
title: Fog Brightness
title: Fog brightness
defaultValue: 0.03
description: "Set brightness of the fog. Min: -1 Max: 1"
min: -1
max: 1
- id: hue_shift
type: number
title: Fog Hue
title: Fog hue
description: "Set hue of the fog. Min: -1 Max: 1"
min: -1
max: 1
- id: surturation_shift
type: number
title: Fog Saturation
title: Fog saturation
description: "Set saturation of the fog. Min: -1 Max: 1"
min: -1
max: 1
Expand Down Expand Up @@ -300,7 +308,7 @@ extensions:
title: Title
- id: showTitle
type: bool
title: Show Title
title: Show title
defaultValue: true
- id: position
type: string
Expand All @@ -326,7 +334,7 @@ extensions:
label: Large
- id: heightType
type: string
title: Height Type
title: Height type
defaultValue: auto
choices:
- key: auto
Expand Down Expand Up @@ -374,7 +382,7 @@ extensions:
description: "The space between the right side of the infobox and the title and blocks. Min: 0 Max: 40"
- id: bgcolor
type: string
title: Background Color
title: Background color
ui: color
- id: outlineWidth
type: number
Expand All @@ -383,11 +391,11 @@ extensions:
max: 20
- id: outlineColor
type: string
title: Outline Color
title: Outline color
ui: color
- id: useMask
type: bool
title: Use Mask
title: Use mask
- id: typography
type: typography
title: Font
Expand Down Expand Up @@ -1028,7 +1036,7 @@ extensions:
schema:
groups:
- id: default
title: 3D Model
title: 3D model
fields:
- id: model
type: url
Expand Down
3 changes: 3 additions & 0 deletions pkg/builtin/manifest_ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ extensions:
title: 最小レベル
tile_maxLevel:
title: 最大レベル
tile_opacity:
title: 不透明性
description: NEEDS DESCRIPTION
atmosphere:
title: 大気
description: 地球を覆う大気圏の設定ができます。
Expand Down
2 changes: 2 additions & 0 deletions pkg/property/schema_field_ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const (
SchemaFieldUISelection SchemaFieldUI = "selection"
SchemaFieldUIColor SchemaFieldUI = "color"
SchemaFieldUIRange SchemaFieldUI = "range"
SchemaFieldUISlider SchemaFieldUI = "slider"
SchemaFieldUIImage SchemaFieldUI = "image"
SchemaFieldUIVideo SchemaFieldUI = "video"
SchemaFieldUIFile SchemaFieldUI = "file"
Expand All @@ -21,6 +22,7 @@ var (
SchemaFieldUISelection,
SchemaFieldUIColor,
SchemaFieldUIRange,
SchemaFieldUISlider,
SchemaFieldUIImage,
SchemaFieldUIVideo,
SchemaFieldUIFile,
Expand Down
1 change: 1 addition & 0 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ enum PropertySchemaFieldUI {
SELECTION
COLOR
RANGE
SLIDER
IMAGE
VIDEO
FILE
Expand Down
3 changes: 2 additions & 1 deletion schemas/plugin_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
"selection",
"buttons",
"range",
"slider",
"image",
"video",
"file",
Expand Down Expand Up @@ -438,4 +439,4 @@
}
},
"$ref": "#/definitions/root"
}
}

0 comments on commit 4f72b87

Please sign in to comment.