mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-20 23:40:10 +00:00
增加Chart的onSerieClick,onSerieDown,onSerieEnter和onSerieExit回调
This commit is contained in:
@@ -161,11 +161,11 @@ namespace XCharts.Runtime
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
if (!Application.isPlaying)
|
||||
GameObject.DestroyImmediate(component as GameObject, true);
|
||||
GameObject.DestroyImmediate(component as UnityEngine.Object);
|
||||
else
|
||||
GameObject.Destroy(component as GameObject);
|
||||
GameObject.Destroy(component as UnityEngine.Object);
|
||||
#else
|
||||
GameObject.Destroy(component as GameObject);
|
||||
GameObject.Destroy(component as UnityEngine.Object);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -389,6 +389,7 @@ namespace XCharts.Runtime
|
||||
var alignment = textStyle.GetAlignment(autoAlignment);
|
||||
UpdateAnchorAndPivotByTextAlignment(alignment, out anchorMin, out anchorMax, out pivot);
|
||||
var labelObj = AddObject(name, parent, anchorMin, anchorMax, pivot, sizeDelta);
|
||||
ChartHelper.RemoveComponent<Text>(labelObj);
|
||||
var label = EnsureComponent<ChartLabel>(labelObj);
|
||||
label.text = AddTextObject("Text", label.gameObject.transform, anchorMin, anchorMax, pivot,
|
||||
sizeDelta, textStyle, theme, autoColor, autoAlignment, label.text);
|
||||
|
||||
Reference in New Issue
Block a user