Changeset View
Changeset View
Standalone View
Standalone View
native/tooltip/tooltip.react.js
Show First 20 Lines • Show All 224 Lines • ▼ Show 20 Lines | get tooltipContainerStyle() { | ||||
const { dimensions, route } = this.props; | const { dimensions, route } = this.props; | ||||
const { initialCoordinates, verticalBounds, chatInputBarHeight } = | const { initialCoordinates, verticalBounds, chatInputBarHeight } = | ||||
route.params; | route.params; | ||||
const { x, y, width, height } = initialCoordinates; | const { x, y, width, height } = initialCoordinates; | ||||
const { margin, tooltipLocation } = this; | const { margin, tooltipLocation } = this; | ||||
const style = {}; | const style = {}; | ||||
style.position = 'absolute'; | style.position = 'absolute'; | ||||
(style.alignItems = 'center'), | style.alignItems = 'center'; | ||||
(style.opacity = this.tooltipContainerOpacity); | style.opacity = this.tooltipContainerOpacity; | ||||
if (tooltipLocation !== 'fixed') { | if (tooltipLocation !== 'fixed') { | ||||
style.transform = [{ translateX: this.tooltipHorizontal }]; | style.transform = [{ translateX: this.tooltipHorizontal }]; | ||||
} | } | ||||
const extraLeftSpace = x; | const extraLeftSpace = x; | ||||
const extraRightSpace = dimensions.width - width - x; | const extraRightSpace = dimensions.width - width - x; | ||||
if (extraLeftSpace < extraRightSpace) { | if (extraLeftSpace < extraRightSpace) { | ||||
▲ Show 20 Lines • Show All 349 Lines • Show Last 20 Lines |