| | |
| | | text.y = 3; |
| | | background.addChild(text); |
| | | tooltip = new PIXI.Container(); |
| | | tooltip.name = "tooltip"; |
| | | tooltip.addChild(background); |
| | | return tooltip; |
| | | } |
| | | |
| | | function onSpriteMouseOver(event) { |
| | | if (tooltip) { |
| | | app.stage.removeChild(tooltip); |
| | | } |
| | | tooltip = createSpriteTooltip(this);// this => sprite |
| | | tooltip.x = event.data.global.x + 10; |
| | | tooltip.y = event.data.global.y + 10; |
| | |
| | | const pointRoute = new PointRoute(POINT_ROUTE_DIRECTION[route.direction]); |
| | | pointRoute.setPoint(startPoint, endPoint); |
| | | pointRoute.clear(); |
| | | pointRoute.lineStyle(10, 0x2d3436); |
| | | pointRoute.lineStyle(8, themeMode === 'light' ? '#2d3436' : '#dcdde1'); |
| | | pointRoute.moveTo(startPoint.position.x, startPoint.position.y); |
| | | pointRoute.lineTo(endPoint.position.x, endPoint.position.y); |
| | | pointRoute.alpha = 1; |