Skip to content

Commit

Permalink
Merge branch 'main' into fix/selection-lost-when-create-layer-style
Browse files Browse the repository at this point in the history
  • Loading branch information
airslice authored Oct 23, 2024
2 parents 240f70c + 8b7e485 commit c33426c
Show file tree
Hide file tree
Showing 12 changed files with 3 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ type Props = {
export const styleConditionOperators: StyleConditionOperator[] = [
"===",
"!==",
"<",
"<=",
">",
">=",
"<",
">",
"startsWith"
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,6 @@ const TypographyInput: FC<Props> = ({ value, onChange }) => {
onChange={(v) => onChange?.({ ...value, italic: v })}
/>
</PropertyItem>
<PropertyItem title={t("underline")}>
<BooleanSelectorField
value={value?.underline}
onChange={(v) => onChange?.({ ...value, underline: v })}
/>
</PropertyItem>
</Wrapper>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const markerNodes: AppearanceNode[] = [
title: "Image Crop",
field: "select",
defaultValue: "none",
valueOptions: ["none", "rounded", "circle"]
valueOptions: ["none", "circle"]
},
{
id: "imageShadow",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ export type Typography = {
fontWeight?: FontWeight;
color?: string;
italic?: boolean;
underline?: boolean;
};

export type Expression = {
Expand Down
16 changes: 0 additions & 16 deletions web/src/beta/features/Visualizer/Crust/Plugins/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ export default function ({
addLayer,
findFeatureById,
findFeaturesByIds,
layersInViewport,
selectLayer,
selectFeature,
selectFeatures,
Expand Down Expand Up @@ -218,7 +217,6 @@ export default function ({
addLayer,
findFeatureById,
findFeaturesByIds,
layersInViewport,
selectLayer,
selectFeature,
selectFeatures,
Expand Down Expand Up @@ -259,15 +257,13 @@ export default function ({
}),
[
engineName,
// viewer
getViewerProperty,
overrideViewerPropertyCommon,
getViewport,
captureScreen,
getInteractionMode,
getInEditor,
getIsBuilt,
// viewer tools
getLocationFromScreenCoordinate,
getScreenCoordinateFromPosition,
getTerrainHeightAsync,
Expand All @@ -277,10 +273,8 @@ export default function ({
cartesianToCartographic,
transformByOffsetOnScreen,
isPositionVisibleOnGlobe,
// viewer events
viewerEventsOn,
viewerEventsOff,
// camera
getCameraPosition,
getCameraFov,
getCameraAspectRatio,
Expand All @@ -300,19 +294,15 @@ export default function ({
move,
moveOverTerrain,
enableForceHorizontalRoll,
// camera events
cameraEventsOn,
cameraEventsOff,
// timeline
getTimeline,
// layers
getLayers,
hideLayer,
showLayer,
addLayer,
findFeatureById,
findFeaturesByIds,
layersInViewport,
selectLayer,
selectFeature,
selectFeatures,
Expand All @@ -321,25 +311,19 @@ export default function ({
getFeaturesInScreenRect,
bringToFront,
sendToBack,
// layers events
layersEventsOn,
layersEventsOff,
// sketch
getSketchTool,
setSketchTool,
getSketchOptions,
overrideSketchOptions,
// sketch events
sketchEventsOn,
sketchEventsOff,
// extension
getExtensionList,
// deprecated
deprecated,
cameraDeprecated,
layersDeprecated,
sketchDeprecated,
// others
overrideViewerProperty,
pluginInstances,
clientStorage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ export default ({
[engineRef]
);

const layersInViewport = useCallback(() => {
return layersRef?.findAll(
(layer) => !!engineRef?.inViewport(layer?.property?.default?.location)
);
}, [engineRef, layersRef]);

const selectLayer = useCallback(
(layerId: string | undefined) => {
Expand Down Expand Up @@ -189,7 +184,6 @@ export default ({
addLayer,
findFeatureById,
findFeaturesByIds,
layersInViewport,
selectLayer,
selectFeature,
selectFeatures,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ export function commonReearth({
addLayer,
findFeatureById,
findFeaturesByIds,
layersInViewport,
selectLayer,
selectFeature,
selectFeatures,
Expand Down Expand Up @@ -148,7 +147,6 @@ export function commonReearth({
addLayer: GlobalThis["reearth"]["layers"]["add"];
findFeatureById: GlobalThis["reearth"]["layers"]["findFeatureById"];
findFeaturesByIds: GlobalThis["reearth"]["layers"]["findFeaturesByIds"];
layersInViewport: GlobalThis["reearth"]["layers"]["layersInViewport"];
selectLayer: GlobalThis["reearth"]["layers"]["select"];
selectFeature: GlobalThis["reearth"]["layers"]["selectFeature"];
selectFeatures: GlobalThis["reearth"]["layers"]["selectFeatures"];
Expand Down Expand Up @@ -300,9 +298,6 @@ export function commonReearth({
get findFeaturesByIds() {
return findFeaturesByIds;
},
get layersInViewport() {
return layersInViewport;
},
get select() {
return selectLayer;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ export type Reearth = {
| "selectedFeature"
| "overriddenLayers"
> & {
readonly layersInViewport?: () => LazyLayer[] | undefined;
readonly overriddenProperties?: Record<string, any>;
readonly overrideProperty?: (
properties: LayerSimple["properties"] | undefined
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export declare type Layers = {
layerId: string,
featureId: string[]
) => Feature[] | undefined;
readonly layersInViewport?: () => LazyLayer[] | undefined;
readonly select?: (layerId: string | undefined) => void;
readonly selectFeature?: (layerId?: string, featureId?: string) => void;
readonly selectFeatures?: (
Expand All @@ -56,7 +55,6 @@ export declare type Layers = {
readonly selectedFeature?: ComputedFeature;
readonly bringToFront?: (layerId: string) => void;
readonly sendToBack?: (layerId: string) => void;
readonly getLayersInViewport?: () => LazyLayer[] | undefined;
readonly getFeaturesInScreenRect: (
rect: [x: number, y: number, width: number, height: number],
// TODO: Get condition as expression for plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ export const context: Context = {
selectedFeature: undefined,
bringToFront: act("layers.bringToFront"),
sendToBack: act("layers.sendToBack"),
getLayersInViewport: act("layers.getLayersInViewport"),
getFeaturesInScreenRect: act("layers.getFeaturesInScreenRect"),
on: act("layers.on"),
off: act("layers.off")
Expand Down
1 change: 0 additions & 1 deletion web/src/services/i18n/translations/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ font size: ''
font weight: ''
font color: ''
italic: ''
underline: ''
New node: ''
Style: ''
Empty: ''
Expand Down
1 change: 0 additions & 1 deletion web/src/services/i18n/translations/ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ font size: ''
font weight: ''
font color: ''
italic: ''
underline: ''
New node: ''
Style: ''
Empty: ''
Expand Down

0 comments on commit c33426c

Please sign in to comment.