File tree 2 files changed +10
-4
lines changed
2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 131
131
132
132
# The following are columns that we add dynamically and internally, so we need
133
133
# to make sure they have unique names that won't clash with existing columns
134
- SIZE_COLUMN_NAME = str (uuid .uuid4 ())
135
134
CMAP_COLUMN_NAME = str (uuid .uuid4 ())
136
135
TIME_COLUMN_NAME = str (uuid .uuid4 ())
137
136
@@ -1406,7 +1405,11 @@ def _serialize_state(self):
1406
1405
if self ._uniform_size ():
1407
1406
state ["settings" ]["sizeColumn" ] = - 1
1408
1407
else :
1409
- state ["settings" ]["sizeColumn" ] = SIZE_COLUMN_NAME
1408
+ state ["settings" ]["sizeColumn" ] = self .size_att
1409
+ state ["settings" ]["normalizeSize" ] = True
1410
+ state ["settings" ]["normalizeSizeMin" ] = self .size_vmin
1411
+ state ["settings" ]["normalizeSizeMax" ] = self .size_vmax
1412
+ state ["settings" ]["normalizeSizeClip" ] = True
1410
1413
state ["settings" ]["pointScaleType" ] = 0
1411
1414
1412
1415
return state
Original file line number Diff line number Diff line change 1
1
import pytest
2
2
3
3
from ..core import BaseWWTWidget
4
- from ..layers import SIZE_COLUMN_NAME
5
4
6
5
import numpy as np
7
6
import os
@@ -470,7 +469,11 @@ def test_table_setting_serialization():
470
469
layer .size_att = 'dec'
471
470
layer .alt_unit = u .Mpc
472
471
473
- expected_settings ['sizeColumn' ] = SIZE_COLUMN_NAME
472
+ expected_settings ['sizeColumn' ] = 'dec'
473
+ expected_settings ['normalizeSize' ] = True
474
+ expected_settings ["normalizeSizeMin" ] = layer .size_vmin
475
+ expected_settings ["normalizeSizeMax" ] = layer .size_vmax
476
+ expected_settings ["normalizeSizeClip" ] = True
474
477
expected_settings ['pointScaleType' ] = 0
475
478
expected_settings ['colorMapColumn' ] = layer .cmap_att
476
479
expected_settings ['colorMap' ] = 3
You can’t perform that action at this time.
0 commit comments