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

Class MapView

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected