Add layer opacity
As requested by @Bfritz0815
This commit is contained in:
parent
2f342b72bc
commit
4a19d8d45e
3 changed files with 6 additions and 3 deletions
|
|
@ -398,12 +398,14 @@ const config : Config = {
|
|||
image: require("../img/layers/rzl/rooms.svg"),
|
||||
baseLayer: true,
|
||||
name: "RaumZeitLabor",
|
||||
defaultVisibility: "visible"
|
||||
defaultVisibility: "visible",
|
||||
opacity: 0.7
|
||||
},
|
||||
{
|
||||
image: require("../img/layers/rzl/details.svg"),
|
||||
name: "Details",
|
||||
defaultVisibility: "visible"
|
||||
defaultVisibility: "visible",
|
||||
opacity: 0.4
|
||||
},
|
||||
{
|
||||
image: require("../img/layers/rzl/labels.svg"),
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ class SpaceMap extends React.Component<{state: State, width: number, height: num
|
|||
return (
|
||||
<LayersControlType name={layer.name}
|
||||
checked={layer.defaultVisibility == "visible"}>
|
||||
<ImageOverlay url={layer.image} bounds={bounds} />
|
||||
<ImageOverlay url={layer.image} bounds={bounds} opacity={layer.opacity} />
|
||||
</LayersControlType>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ declare type Layer = {
|
|||
name: string,
|
||||
baseLayer: boolean,
|
||||
defaultVisibility: "visible" | "hidden",
|
||||
opacity: number
|
||||
};
|
||||
|
||||
declare type StateAction = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue