File tree Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 108
108
"source" : [
109
109
" **Use the handle on the bottom right corner of the _canvas_ to resize it. You can also pan and zoom using your mouse!**\n " ,
110
110
" \n " ,
111
- " By default the origin is on the bottom left, you can click the flip button to flip the y-axis, or use `plot.camera.world .scale_y *= -1`"
111
+ " By default the origin is on the bottom left, you can click the flip button to flip the y-axis, or use `plot.camera.local .scale_y *= -1`"
112
112
]
113
113
},
114
114
{
120
120
},
121
121
"outputs" : [],
122
122
"source" : [
123
- " plot.camera.world .scale_y *= -1"
123
+ " plot.camera.local .scale_y *= -1"
124
124
]
125
125
},
126
126
{
464
464
},
465
465
"outputs" : [],
466
466
"source" : [
467
- " plot_rgb.camera.world .scale_y *= -1"
467
+ " plot_rgb.camera.local .scale_y *= -1"
468
468
]
469
469
},
470
470
{
Original file line number Diff line number Diff line change @@ -415,9 +415,9 @@ def __init__(self, plot: GridPlot):
415
415
self .flip_camera_button = Button (
416
416
value = False ,
417
417
disabled = False ,
418
- icon = "arrows-v " ,
418
+ icon = "arrow-up " ,
419
419
layout = Layout (width = "auto" ),
420
- tooltip = "flip " ,
420
+ tooltip = "y-axis direction " ,
421
421
)
422
422
423
423
self .record_button = ToggleButton (
@@ -490,7 +490,11 @@ def maintain_aspect(self, obj):
490
490
491
491
def flip_camera (self , obj ):
492
492
current = self .current_subplot
493
- current .camera .world .scale_y *= - 1
493
+ current .camera .local .scale_y *= - 1
494
+ if current .camera .local .scale_y == - 1 :
495
+ self .flip_camera_button .icon = "arrow-down"
496
+ else :
497
+ self .flip_camera_button .icon = "arrow-up"
494
498
495
499
def update_current_subplot (self , ev ):
496
500
for subplot in self .plot :
Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ def __init__(self, plot: Plot):
170
170
self .flip_camera_button = Button (
171
171
value = False ,
172
172
disabled = False ,
173
- icon = "arrows-v " ,
173
+ icon = "arrow-up " ,
174
174
layout = Layout (width = "auto" ),
175
175
tooltip = "flip" ,
176
176
)
@@ -224,7 +224,11 @@ def maintain_aspect(self, obj):
224
224
self .plot .camera .maintain_aspect = self .maintain_aspect_button .value
225
225
226
226
def flip_camera (self , obj ):
227
- self .plot .camera .world .scale_y *= - 1
227
+ self .plot .camera .local .scale_y *= - 1
228
+ if self .plot .camera .local .scale_y == - 1 :
229
+ self .flip_camera_button .icon = "arrow-down"
230
+ else :
231
+ self .flip_camera_button .icon = "arrow-up"
228
232
229
233
def add_polygon (self , obj ):
230
234
ps = PolygonSelector (edge_width = 3 , edge_color = "magenta" )
You can’t perform that action at this time.
0 commit comments