@@ -158,7 +158,7 @@ return function(Iris: Types.Internal, widgets: Types.WidgetUtility)
158
158
end
159
159
end
160
160
161
- local function updateLine (thisWidget : Types.PlotLines )
161
+ local function updateLine (thisWidget : Types.PlotLines , silent : true ? )
162
162
local PlotLines = thisWidget .Instance :: Frame
163
163
local Background = PlotLines .Background :: Frame
164
164
local Plot = Background .Plot :: Frame
@@ -171,7 +171,7 @@ return function(Iris: Types.Internal, widgets: Types.WidgetUtility)
171
171
local line : Frame ? = thisWidget .Lines [index ]
172
172
173
173
if line then
174
- if line ~= thisWidget .HoveredLine then
174
+ if line ~= thisWidget .HoveredLine and not silent then
175
175
clearLine (thisWidget )
176
176
end
177
177
local start : number ? = thisWidget .state .values .value [index ]
@@ -186,7 +186,11 @@ return function(Iris: Types.Internal, widgets: Types.WidgetUtility)
186
186
thisWidget .HoveredLine = line
187
187
line .BackgroundColor3 = Iris ._config .PlotLinesHoveredColor
188
188
line .BackgroundTransparency = Iris ._config .PlotLinesHoveredTransparency
189
- thisWidget .state .hovered :set ({ start , stop })
189
+ if silent then
190
+ thisWidget .state .hovered .value = { start , stop }
191
+ else
192
+ thisWidget .state .hovered :set ({ start , stop })
193
+ end
190
194
end
191
195
end
192
196
@@ -379,9 +383,9 @@ return function(Iris: Types.Internal, widgets: Types.WidgetUtility)
379
383
end
380
384
381
385
-- only update the hovered block if it exists.
382
- -- if thisWidget.HoveredLine then
383
- -- updateLine(thisWidget)
384
- -- end
386
+ if thisWidget .HoveredLine then
387
+ updateLine (thisWidget , true )
388
+ end
385
389
end
386
390
end ,
387
391
Discard = function (thisWidget : Types.PlotLines )
@@ -411,7 +415,7 @@ return function(Iris: Types.Internal, widgets: Types.WidgetUtility)
411
415
end
412
416
end
413
417
414
- local function updateBlock (thisWidget : Types.PlotHistogram )
418
+ local function updateBlock (thisWidget : Types.PlotHistogram , silent : true ? )
415
419
local PlotHistogram = thisWidget .Instance :: Frame
416
420
local Background = PlotHistogram .Background :: Frame
417
421
local Plot = Background .Plot :: Frame
@@ -424,7 +428,7 @@ return function(Iris: Types.Internal, widgets: Types.WidgetUtility)
424
428
local block : Frame ? = thisWidget .Blocks [index ]
425
429
426
430
if block then
427
- if block ~= thisWidget .HoveredBlock then
431
+ if block ~= thisWidget .HoveredBlock and not silent then
428
432
clearBlock (thisWidget )
429
433
end
430
434
local value : number ? = thisWidget .state .values .value [index ]
@@ -434,7 +438,11 @@ return function(Iris: Types.Internal, widgets: Types.WidgetUtility)
434
438
thisWidget .HoveredBlock = block
435
439
block .BackgroundColor3 = Iris ._config .PlotHistogramHoveredColor
436
440
block .BackgroundTransparency = Iris ._config .PlotHistogramHoveredTransparency
437
- thisWidget .state .hovered :set (value )
441
+ if silent then
442
+ thisWidget .state .hovered .value = value
443
+ else
444
+ thisWidget .state .hovered :set (value )
445
+ end
438
446
end
439
447
end
440
448
@@ -626,7 +634,7 @@ return function(Iris: Types.Internal, widgets: Types.WidgetUtility)
626
634
627
635
-- only update the hovered block if it exists.
628
636
if thisWidget .HoveredBlock then
629
- updateBlock (thisWidget )
637
+ updateBlock (thisWidget , true )
630
638
end
631
639
end
632
640
end ,
0 commit comments