Skip to content

Commit

Permalink
init with def value
Browse files Browse the repository at this point in the history
  • Loading branch information
codeanticode committed Sep 10, 2024
1 parent f00b31a commit 92cfc89
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jscatter/jscatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from .annotations import Line, HLine, VLine, Rect
from .encodings import Encodings
from .widget import JupyterScatter, SELECTION_DTYPE
from .widget import JupyterScatter, SELECTION_DTYPE, COORDINATE_DTYPE
from .color_maps import okabe_ito, glasbey_light, glasbey_dark
from .utils import any_not, to_ndc, tolist, uri_validator, to_scale_type, get_scale_type_from_df, get_domain_from_df, create_default_norm, create_labeling, get_histogram_from_df, sanitize_tooltip_properties, zerofy_missing_values
from .types import Auto, Color, Scales, MouseModes, Auto, Reverse, Segment, Size, LegendPosition, VisualProperty, Labeling, TooltipPreviewType, TooltipPreviewImagePosition, TooltipPreviewImageSize, Undefined
Expand Down Expand Up @@ -237,6 +237,8 @@ def __init__(
self._filtered_points_ids = None
self._filtered_points_idxs = None

self._center_positions = np.asarray([], dtype=COORDINATE_DTYPE)

self._transition_points = True
self._transition_points_duration = DEFAULT_TRANSITION_POINTS_DURATION

Expand Down Expand Up @@ -4188,6 +4190,7 @@ def widget(self):
reticle=self._reticle,
reticle_color=self.get_reticle_color(),
selection=self._selected_points_idxs,
center_positions=self._center_positions,
size=order_map(self._size_map, self._size_order) if self._size_map else self._size,
size_by=self.js_size_by,
size_domain=get_domain(self, 'size'),
Expand Down
1 change: 1 addition & 0 deletions jscatter/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
)

SELECTION_DTYPE = 'uint32'
COORDINATE_DTYPE = 'float32'
EVENT_TYPES = {
"TOOLTIP": "tooltip",
"VIEW_DOWNLOAD": "view_download",
Expand Down

0 comments on commit 92cfc89

Please sign in to comment.