MCPcopy Create free account
hub / github.com/PaulleDemon/PyUIBuilder / MapView

Class MapView

src/frameworks/tkinter/plugins/mapview.js:13–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11
12
13class MapView extends TkinterBase{
14
15 static widgetType = "map_view"
16 static displayName = "Map View"
17
18 static requiredImports = [
19 ...TkinterBase.requiredImports,
20 "import tkintermapview"
21 ]
22
23 static requirements = ["tkintermapview"]
24
25 constructor(props) {
26 super(props)
27
28 this.droppableTags = null
29
30 const newAttrs = removeKeyFromObject("layout", this.state.attrs)
31
32 this.state = {
33 ...this.state,
34 widgetName: "Map viewer",
35 size: { width: 400, height: 250 },
36 }
37 }
38
39 // componentDidMount(){
40 // super.componentDidMount()
41 // }
42
43 generateCode(variableName, parent){
44
45
46 return [
47 `${variableName} = tkintermapview.TkinterMapView(master=${parent})`,
48 `${variableName}.${this.getLayoutCode()}`
49 ]
50 }
51
52
53 getToolbarAttrs(){
54
55 const toolBarAttrs = super.getToolbarAttrs()
56
57
58 return ({
59 id: this.__id,
60 widgetName: toolBarAttrs.widgetName,
61 size: toolBarAttrs.size,
62
63 ...this.state.attrs,
64
65 })
66 }
67
68 renderContent(){
69 return (
70 <div className="tw-w-flex tw-flex-col tw-w-full tw-h-full tw-rounded-md

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected