-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
208 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
import type { ImplementLayerProps } from '@antv/li-sdk'; | ||
import React from 'react'; | ||
import type { MVTLayerProps } from './mvt-layer'; | ||
import MVTLayer from './mvt-layer'; | ||
import type { MVTLayerSource } from './type'; | ||
|
||
export interface MVTLayerWrapperProps extends ImplementLayerProps { | ||
export interface MVTLayerWrapperProps extends ImplementLayerProps, MVTLayerProps { | ||
source: MVTLayerSource; | ||
} | ||
|
||
const MVTLayerWrapper: React.FC<MVTLayerWrapperProps> = (props) => { | ||
const { source } = props; | ||
const metadataUrl = props.source.parser.metadataUrl; | ||
const metadataUrl = source.parser.metadataUrl; | ||
|
||
return <MVTLayer source={source} metadataUrl={metadataUrl} />; | ||
return <MVTLayer {...props} metadataUrl={metadataUrl} />; | ||
}; | ||
|
||
export default MVTLayerWrapper; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 8 additions & 34 deletions
42
packages/li-core-assets/src/layers/MVTLayer/register-form/schema.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,14 @@ | ||
import type { FieldSelectOptionType } from '@antv/li-p2'; | ||
import fillColorCollapse from '@antv/li-p2/dist/esm/LayerAttribute/common-schema/fill-color-collapse'; | ||
import otherAttributesCollapse from '@antv/li-p2/dist/esm/LayerAttribute/common-schema/other-attributes-collapse'; | ||
import pointRadiusCollapse from '@antv/li-p2/dist/esm/LayerAttribute/common-schema/point-radius-collapse'; | ||
import strokeCollapse from '@antv/li-p2/dist/esm/LayerAttribute/common-schema/stroke-collapse'; | ||
|
||
export default () => { | ||
export default (fieldList: FieldSelectOptionType[]) => { | ||
return { | ||
collapseItem_style: { | ||
type: 'void', | ||
'x-component': 'FormCollapse', | ||
'x-component-props': { | ||
ghost: true, | ||
destroyInactivePanel: true, | ||
defaultActiveKey: [], | ||
}, | ||
properties: { | ||
style: { | ||
type: 'void', | ||
'x-component': 'FormCollapse.CollapsePanel', | ||
'x-component-props': { | ||
header: '样式', | ||
}, | ||
properties: { | ||
opacity: { | ||
type: 'number', | ||
title: '透明度', | ||
default: 1, | ||
'x-decorator-props': {}, | ||
'x-decorator': 'FormItem', | ||
'x-component': 'Slider', | ||
'x-component-props': { | ||
min: 0, | ||
max: 1, | ||
step: 0.1, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
collapseItem_fillColor: fillColorCollapse({ fieldList }), | ||
collapseItem_stroke: strokeCollapse(), | ||
collapseItem_fillradius: pointRadiusCollapse({ fieldList, collapseTitle: '半径' }), | ||
collapseItem_other: otherAttributesCollapse(), | ||
}; | ||
}; |
Oops, something went wrong.