|
|
|
|
|
|
m_PreviewScrollPosition = new Vector2(0f, 0f); |
|
|
|
|
|
|
|
middleContainer.Add(m_PreviewTextureView); |
|
|
|
|
|
|
|
middleContainer.AddManipulator(new Scrollable(OnScroll)); |
|
|
|
void OnScroll(float scrollValue) |
|
|
|
{ |
|
|
|
float rescaleAmount = -scrollValue * .03f; |
|
|
|
m_Graph.previewData.scale = Mathf.Clamp(m_Graph.previewData.scale + rescaleAmount, 0.2f, 5f); |
|
|
|
} |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
foreach (var primitiveTypeName in Enum.GetNames(typeof(PrimitiveType))) |
|
|
|
{ |
|
|
|
if(m_DoNotShowPrimitives.Contains(primitiveTypeName)) |
|
|
|