mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
[MIRROR] Another fix for laggy tgui tooltips -- Turn off popper event listeners (+ give R&D console its tooltips again) (#8109)
* Another fix for laggy tgui tooltips -- Turn off popper event listeners (+ give R&D console its tooltips again) (#61343) Every single popper registered TWO event listeners for scrolling and resizing. This does not appear to be necessary for our cases. The R&D console has been given back its tooltips * Another fix for laggy tgui tooltips -- Turn off popper event listeners (+ give R&D console its tooltips again) Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
@@ -53,6 +53,10 @@ export class Tooltip extends Component<TooltipProps, TooltipState> {
|
||||
<Popper
|
||||
options={{
|
||||
placement: this.props.position || "auto",
|
||||
modifiers: [{
|
||||
name: "eventListeners",
|
||||
enabled: false,
|
||||
}],
|
||||
}}
|
||||
popperContent={
|
||||
<div
|
||||
|
||||
@@ -720,10 +720,8 @@ const TechNode = (props, context) => {
|
||||
<Button
|
||||
key={id}
|
||||
className={`${design_cache[k].class} Techweb__DesignIcon`}
|
||||
// Uncomment these only when tooltip performance is improved.
|
||||
// Reason for removal: Causes massive performance decreases
|
||||
// tooltip={design_cache[k].name}
|
||||
// tooltipPosition={i % 15 < 7 ? "right" : "left"}
|
||||
tooltip={design_cache[k].name}
|
||||
tooltipPosition={i % 15 < 7 ? "right" : "left"}
|
||||
/>
|
||||
))}
|
||||
</Box>
|
||||
|
||||
Reference in New Issue
Block a user