forked from MapComplete/MapComplete
refactoring
This commit is contained in:
parent
b94a8f5745
commit
5d0fe31c41
114 changed files with 2412 additions and 2958 deletions
|
@ -2,12 +2,12 @@ import { OsmCreateAction } from "./OsmChangeAction"
|
|||
import { Tag } from "../../Tags/Tag"
|
||||
import { Changes } from "../Changes"
|
||||
import { ChangeDescription } from "./ChangeDescription"
|
||||
import FeaturePipelineState from "../../State/FeaturePipelineState"
|
||||
import FeatureSource from "../../FeatureSource/FeatureSource"
|
||||
import CreateNewWayAction from "./CreateNewWayAction"
|
||||
import CreateWayWithPointReuseAction, { MergePointConfig } from "./CreateWayWithPointReuseAction"
|
||||
import { And } from "../../Tags/And"
|
||||
import { TagUtils } from "../../Tags/TagUtils"
|
||||
import { SpecialVisualizationState } from "../../../UI/SpecialVisualization"
|
||||
import FeatureSource from "../../FeatureSource/FeatureSource"
|
||||
|
||||
/**
|
||||
* More or less the same as 'CreateNewWay', except that it'll try to reuse already existing points
|
||||
|
@ -26,14 +26,14 @@ export default class CreateMultiPolygonWithPointReuseAction extends OsmCreateAct
|
|||
tags: Tag[],
|
||||
outerRingCoordinates: [number, number][],
|
||||
innerRingsCoordinates: [number, number][][],
|
||||
state: FeaturePipelineState,
|
||||
state: SpecialVisualizationState,
|
||||
config: MergePointConfig[],
|
||||
changeType: "import" | "create" | string
|
||||
) {
|
||||
super(null, true)
|
||||
this._tags = [...tags, new Tag("type", "multipolygon")]
|
||||
this.changeType = changeType
|
||||
this.theme = state?.layoutToUse?.id ?? ""
|
||||
this.theme = state?.layout?.id ?? ""
|
||||
this.createOuterWay = new CreateWayWithPointReuseAction(
|
||||
[],
|
||||
outerRingCoordinates,
|
||||
|
@ -45,7 +45,7 @@ export default class CreateMultiPolygonWithPointReuseAction extends OsmCreateAct
|
|||
new CreateNewWayAction(
|
||||
[],
|
||||
ringCoordinates.map(([lon, lat]) => ({ lat, lon })),
|
||||
{ theme: state?.layoutToUse?.id }
|
||||
{ theme: state?.layout?.id }
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -59,6 +59,10 @@ export default class CreateMultiPolygonWithPointReuseAction extends OsmCreateAct
|
|||
}
|
||||
}
|
||||
|
||||
public async getPreview(): Promise<FeatureSource> {
|
||||
return undefined
|
||||
}
|
||||
|
||||
protected async CreateChangeDescriptions(changes: Changes): Promise<ChangeDescription[]> {
|
||||
console.log("Running CMPWPRA")
|
||||
const descriptions: ChangeDescription[] = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue