diff --git a/server/mapobject/setup.go b/server/mapobject/setup.go index 62767b5..70d6d36 100644 --- a/server/mapobject/setup.go +++ b/server/mapobject/setup.go @@ -32,6 +32,8 @@ func (this *Listener) OnEvent(eventtype string, o interface{}) { panic(err) } + this.ctx.WebEventbus.Emit("mapobjects-cleared", block.Pos) + for id, name := range block.BlockMapping { for k, v := range this.objectlisteners { if k == name { @@ -46,7 +48,7 @@ func (this *Listener) OnEvent(eventtype string, o interface{}) { if obj != nil { this.ctx.Objectdb.AddMapData(obj) - this.ctx.WebEventbus.Emit("mapobject", obj) + this.ctx.WebEventbus.Emit("mapobject-created", obj) } } } //z diff --git a/server/static/css/custom.css b/server/static/css/custom.css new file mode 100644 index 0000000..f49372a --- /dev/null +++ b/server/static/css/custom.css @@ -0,0 +1,15 @@ +body { + height: 100%; +} + +#image-map { + width: 100%; + height: 100%; + border: 1px solid #ccc; + margin-bottom: 10px; +} + +.leaflet-custom-display { + background: #fff; + padding: 5px; +} diff --git a/server/static/index.html b/server/static/index.html index 2b9cdd6..c9c0709 100644 --- a/server/static/index.html +++ b/server/static/index.html @@ -5,25 +5,8 @@ +