void IDragHandler.OnDrag(PointerEventData eventData) { if (Object.op_Inequality((Object)this.Parent, (Object)null) && Object.op_Inequality((Object)this.SecondaryTarget, (Object)null)) { if ((double)this.XSign != 0.0) { float num1 = this.m_midX + (float)eventData.get_delta().x *(float)Math.Sign(this.XSign); double num2 = (double)num1; Rect rect = this.Parent.get_rect(); double num3 = (double)((Rect) ref rect).get_width() - (double)this.Target.get_minWidth() - (double)this.SecondaryTarget.get_minWidth(); float num4 = (float)(num2 / num3); this.Target.set_flexibleWidth(num4); this.SecondaryTarget.set_flexibleWidth(1f - num4); this.m_midX = num1; } if ((double)this.YSign != 0.0) { float num1 = this.m_midY + (float)eventData.get_delta().y *(float)Math.Sign(this.YSign); double num2 = (double)num1; Rect rect = this.Parent.get_rect(); double num3 = (double)((Rect) ref rect).get_height() - (double)this.Target.get_minHeight() - (double)this.SecondaryTarget.get_minHeight(); float num4 = (float)(num2 / num3); this.Target.set_flexibleHeight(num4); this.SecondaryTarget.set_flexibleHeight(1f - num4); this.m_midY = num1; } if ((double)this.XSign != 0.0) { this.Target.set_flexibleWidth(Mathf.Clamp01(this.Target.get_flexibleWidth())); this.SecondaryTarget.set_flexibleWidth(Mathf.Clamp01(this.SecondaryTarget.get_flexibleWidth())); } if ((double)this.YSign == 0.0) { return; } this.Target.set_flexibleHeight(Mathf.Clamp01(this.Target.get_flexibleHeight())); this.SecondaryTarget.set_flexibleHeight(Mathf.Clamp01(this.SecondaryTarget.get_flexibleHeight())); } else { if ((double)this.XSign != 0.0) { LayoutElement target = this.Target; target.set_preferredWidth(target.get_preferredWidth() + (float)eventData.get_delta().x *(float)Math.Sign(this.XSign)); if (this.HasMaxSize && (double)this.Target.get_preferredWidth() > (double)this.MaxSize) { this.Target.set_preferredWidth(this.MaxSize); } } if ((double)this.YSign == 0.0) { return; } LayoutElement target1 = this.Target; target1.set_preferredHeight(target1.get_preferredHeight() + (float)eventData.get_delta().y *(float)Math.Sign(this.YSign)); if (!this.HasMaxSize || (double)this.Target.get_preferredHeight() <= (double)this.MaxSize) { return; } this.Target.set_preferredHeight(this.MaxSize); } }