mirror of
https://github.com/maputnik/editor.git
synced 2026-07-30 09:47:28 +00:00
Directly wrap Mapbox GL
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import React from 'react';
|
||||
|
||||
export class StyleCommand {
|
||||
do(map) {
|
||||
throw new TypeError("Do not implemented");
|
||||
}
|
||||
undo(map) {
|
||||
throw new TypeError("Undo not implemented");
|
||||
}
|
||||
}
|
||||
|
||||
export class StyleEditor {
|
||||
constructor(map, style) {
|
||||
this.map = map;
|
||||
this.style = style;
|
||||
this.history = [];
|
||||
}
|
||||
|
||||
layers() {
|
||||
return this.style.layers;
|
||||
}
|
||||
|
||||
execute(command) {
|
||||
this.history.push(command);
|
||||
command.do(this.map);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user