diff options
Diffstat (limited to 'Map/Presentation/MapEditor.swift')
| -rw-r--r-- | Map/Presentation/MapEditor.swift | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/Map/Presentation/MapEditor.swift b/Map/Presentation/MapEditor.swift index f5589e5..892c803 100644 --- a/Map/Presentation/MapEditor.swift +++ b/Map/Presentation/MapEditor.swift @@ -13,13 +13,13 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see https://map.tranquil.systems. import SwiftUI +import WmapParser struct MapEditor: View { @Binding var document: MapDocument - var url: URL? @State var selectedEvolution: StageType = .behavior @State var isSearching: Bool = false - var parsedMap: Wmap.ParsedMap { + var parsedMap: WmapParser.Map { document.parsed } @@ -89,9 +89,6 @@ struct MapEditor: View { } } }, - onSubmit: { - - }, onDismiss: { isSearching = false } @@ -129,7 +126,7 @@ struct MapEditor: View { GeometryReader { geometry in ScrollView([.horizontal, .vertical], showsIndicators: false) { MapRenderView( - entities: parsedMap.entities, evolution: $selectedEvolution, + parsedMap: parsedMap, evolution: $selectedEvolution, onDragVertex: onDragVertex ) .scaleEffect(zoom, anchor: .center).frame( @@ -285,5 +282,5 @@ struct MapEditor: View { } #Preview { - MapEditor(document: .constant(MapDocument(text: nil)), url: URL(filePath: "test.wmap")!) + MapEditor(document: .constant(MapDocument(text: nil))) } |