Skip to content

Commit b3c0323

Browse files
committed
Change fullscreen and panel setup
1 parent 349b488 commit b3c0323

File tree

3 files changed

+7
-16
lines changed

3 files changed

+7
-16
lines changed

player/player.view.css.ts

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ namespace $.$$ {
6262
pointerEvents: 'none',
6363
position: 'absolute',
6464
zIndex: 1,
65+
fontSize: '13px',
6566
flex: {
6667
direction: 'column',
6768
},

player/player.view.tree

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
$optimade_cifplayer_player $mol_view
22
data? null
33
externals? null
4+
fullscreen? true
5+
skip_panel? false
46
atom_radius_scale 0.6
57
zoom_scale_step 0.3
68
-
@@ -100,9 +102,6 @@ $optimade_cifplayer_player $mol_view
100102
Icon <= Center_icon $mol_icon_image_filter_center_focus
101103
<= Tools $mol_view
102104
sub /
103-
<= Fullscreen $mol_check
104-
checked? <=> fullscreen? false
105-
Icon <= Expand_icon $mol_icon_arrow_expand_all
106105
<= Zoom_section $mol_list
107106
sub /
108107
<= Zoom_up $mol_button_minor
@@ -111,7 +110,6 @@ $optimade_cifplayer_player $mol_view
111110
<= Zoom_down $mol_button_minor
112111
click? <=> zoom_down? null
113112
sub / <= Zoom_down_icon $mol_icon_magnify_minus_outline
114-
^ lights_toggle / <= Lights $mol_lights_toggle
115113
<= Overlays $mol_view
116114
sub <= overlays_sub /
117115
<= Switch_overlay $mol_switch

player/player.view.web.ts

+4-12
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,7 @@ namespace $.$$ {
1212

1313
@ $mol_mem
1414
external_theme_auto() {
15-
const external = this.externals()?.theme
16-
if( !external ) return
17-
18-
this.$.$mol_lights( external == 'light' ? true : false )
19-
}
20-
21-
@ $mol_mem
22-
lights_toggle() {
23-
return this.externals()?.theme ? [] : super.lights_toggle()
15+
this.$.$mol_lights( true )
2416
}
2517

2618
@ $mol_mem
@@ -136,7 +128,7 @@ namespace $.$$ {
136128
canvas.width = metrics.width * 3.5
137129
canvas.height = 30
138130

139-
context.font = "italic 28px sans-serif"
131+
context.font = "28px sans-serif"
140132
context.textAlign = "center"
141133
context.textBaseline = "middle"
142134
context.fillStyle = this.$.$mol_lights() ? "#000" : "#fff"
@@ -508,7 +500,7 @@ namespace $.$$ {
508500
atoms.forEach( ( atom: InstanceType< THREE["Object3D"] >, i: number ) => {
509501
const start = atom.position.toArray()
510502
const [ x, y, z ] = phonon[ i ].map( ( v, i ) => start[ i ] + v * phonon_amp )
511-
503+
512504
this.tweens.add( new TWEEN.Tween( atom.position ).to( { x, y, z }, 750 )
513505
.easing( TWEEN.Easing.Cubic.InOut ).repeat( Infinity ).yoyo( true ).start()
514506
)
@@ -578,7 +570,7 @@ namespace $.$$ {
578570
@ $mol_mem
579571
left_panel(): readonly any[] {
580572

581-
if (this.externals()?.skip_panel) return []
573+
if (this.skip_panel()) return []
582574

583575
try {
584576
this.structure_3d_data()

0 commit comments

Comments
 (0)