|
| 1 | +{ |
| 2 | + const withForms = document.getElementById("with-forms") |
| 3 | + ? JSON.parse(document.getElementById("with-forms").textContent) |
| 4 | + : false; |
| 5 | + if (withForms) { |
| 6 | + L.drawLocal.draw.toolbar.actions.title = JSON.parse( |
| 7 | + document.getElementById("draw-toolbar-actions-title").textContent, |
| 8 | + ); |
| 9 | + L.drawLocal.draw.toolbar.actions.text = JSON.parse( |
| 10 | + document.getElementById("draw-toolbar-actions-text").textContent, |
| 11 | + ); |
| 12 | + L.drawLocal.draw.toolbar.undo.title = JSON.parse( |
| 13 | + document.getElementById("draw-toolbar-undo-title").textContent, |
| 14 | + ); |
| 15 | + L.drawLocal.draw.toolbar.undo.text = JSON.parse( |
| 16 | + document.getElementById("draw-toolbar-undo-text").textContent, |
| 17 | + ); |
| 18 | + L.drawLocal.draw.toolbar.buttons.polyline = JSON.parse( |
| 19 | + document.getElementById("draw-toolbar-buttons-polyline").textContent, |
| 20 | + ); |
| 21 | + L.drawLocal.draw.toolbar.buttons.polygon = JSON.parse( |
| 22 | + document.getElementById("draw-toolbar-buttons-polygon").textContent, |
| 23 | + ); |
| 24 | + L.drawLocal.draw.toolbar.buttons.rectangle = JSON.parse( |
| 25 | + document.getElementById("draw-toolbar-buttons-rectangle").textContent, |
| 26 | + ); |
| 27 | + L.drawLocal.draw.toolbar.buttons.circle = JSON.parse( |
| 28 | + document.getElementById("draw-toolbar-buttons-circle").textContent, |
| 29 | + ); |
| 30 | + L.drawLocal.draw.toolbar.buttons.marker = JSON.parse( |
| 31 | + document.getElementById("draw-toolbar-buttons-marker").textContent, |
| 32 | + ); |
| 33 | + L.drawLocal.draw.handlers.circle.tooltip.start = JSON.parse( |
| 34 | + document.getElementById("draw-handlers-circle-tooltip-start").textContent, |
| 35 | + ); |
| 36 | + L.drawLocal.draw.handlers.marker.tooltip.start = JSON.parse( |
| 37 | + document.getElementById("draw-handlers-marker-tooltip-start").textContent, |
| 38 | + ); |
| 39 | + L.drawLocal.draw.handlers.polygon.tooltip.start = JSON.parse( |
| 40 | + document.getElementById("draw-handlers-polygon-tooltip-start") |
| 41 | + .textContent, |
| 42 | + ); |
| 43 | + L.drawLocal.draw.handlers.polygon.tooltip.cont = JSON.parse( |
| 44 | + document.getElementById("draw-handlers-polygon-tooltip-cont").textContent, |
| 45 | + ); |
| 46 | + L.drawLocal.draw.handlers.polygon.tooltip.end = JSON.parse( |
| 47 | + document.getElementById("draw-handlers-polygon-tooltip-end").textContent, |
| 48 | + ); |
| 49 | + L.drawLocal.draw.handlers.polyline.error = JSON.parse( |
| 50 | + document.getElementById("draw-handlers-polyline-error").textContent, |
| 51 | + ); |
| 52 | + L.drawLocal.draw.handlers.polyline.tooltip.start = JSON.parse( |
| 53 | + document.getElementById("draw-handlers-polyline-tooltip-start") |
| 54 | + .textContent, |
| 55 | + ); |
| 56 | + L.drawLocal.draw.handlers.polyline.tooltip.cont = JSON.parse( |
| 57 | + document.getElementById("draw-handlers-polyline-tooltip-cont") |
| 58 | + .textContent, |
| 59 | + ); |
| 60 | + L.drawLocal.draw.handlers.polyline.tooltip.end = JSON.parse( |
| 61 | + document.getElementById("draw-handlers-polyline-tooltip-end").textContent, |
| 62 | + ); |
| 63 | + L.drawLocal.draw.handlers.rectangle.tooltip.start = JSON.parse( |
| 64 | + document.getElementById("draw-handlers-rectangle-tooltip-start") |
| 65 | + .textContent, |
| 66 | + ); |
| 67 | + L.drawLocal.draw.handlers.simpleshape.tooltip.end = JSON.parse( |
| 68 | + document.getElementById("draw-handlers-simpleshape-tooltip-end") |
| 69 | + .textContent, |
| 70 | + ); |
| 71 | + |
| 72 | + L.drawLocal.edit.toolbar.actions.save.title = JSON.parse( |
| 73 | + document.getElementById("edit-toolbar-actions-save-title").textContent, |
| 74 | + ); |
| 75 | + L.drawLocal.edit.toolbar.actions.save.text = JSON.parse( |
| 76 | + document.getElementById("edit-toolbar-actions-save-text").textContent, |
| 77 | + ); |
| 78 | + L.drawLocal.edit.toolbar.actions.cancel.title = JSON.parse( |
| 79 | + document.getElementById("edit-toolbar-actions-cancel-title").textContent, |
| 80 | + ); |
| 81 | + L.drawLocal.edit.toolbar.actions.cancel.text = JSON.parse( |
| 82 | + document.getElementById("edit-toolbar-actions-cancel-text").textContent, |
| 83 | + ); |
| 84 | + L.drawLocal.edit.toolbar.buttons.edit = JSON.parse( |
| 85 | + document.getElementById("edit-toolbar-buttons-edit").textContent, |
| 86 | + ); |
| 87 | + L.drawLocal.edit.toolbar.buttons.editDisabled = JSON.parse( |
| 88 | + document.getElementById("edit-toolbar-buttons-editDisabled").textContent, |
| 89 | + ); |
| 90 | + L.drawLocal.edit.toolbar.buttons.remove = JSON.parse( |
| 91 | + document.getElementById("edit-toolbar-buttons-remove").textContent, |
| 92 | + ); |
| 93 | + L.drawLocal.edit.toolbar.buttons.removeDisabled = JSON.parse( |
| 94 | + document.getElementById("edit-toolbar-buttons-removeDisabled") |
| 95 | + .textContent, |
| 96 | + ); |
| 97 | + L.drawLocal.edit.handlers.edit.tooltip.text = JSON.parse( |
| 98 | + document.getElementById("edit-handlers-edit-tooltip-text").textContent, |
| 99 | + ); |
| 100 | + L.drawLocal.edit.handlers.edit.tooltip.subtext = JSON.parse( |
| 101 | + document.getElementById("edit-handlers-edit-tooltip-subtext").textContent, |
| 102 | + ); |
| 103 | + L.drawLocal.edit.handlers.remove.tooltip.text = JSON.parse( |
| 104 | + document.getElementById("edit-handlers-remove-tooltip-text").textContent, |
| 105 | + ); |
| 106 | + } |
| 107 | +} |
0 commit comments