示例#1
0
        //caption can be moved independently from cluster. when cluster begins movements,
        //we save relative positions of caption to update them accordingly
        public void UpdateRelatives()
        {
            var capOrg = _hostShape.capOrgProvider();

            if (text != null)
            {
                var textOrg = text.GetOrigin();
                textX = textOrg.X - capOrg.X;
                textY = textOrg.Y - capOrg.Y;
            }

            if (_freeDraw != null)
            {
                var freeDrawOrg = _freeDraw.GetOrigin();
                freeDrawX = freeDrawOrg.X - capOrg.X;
                freeDrawY = freeDrawOrg.Y - capOrg.Y;
            }
        }
示例#2
0
        //caption can be moved independently from cluster. when cluster beings movements,
        //we save relative positions of caption to update them accordingly
        public void UpdateRelatives()
        {
            var clustOrg = cluster.boundsProvider().TopLeft;

            if (text != null)
            {
                var textOrg = text.GetOrigin();
                textX = textOrg.X - clustOrg.X;
                textY = textOrg.Y - clustOrg.Y;
            }

            if (_freeDraw != null)
            {
                var freeDrawOrg = _freeDraw.GetOrigin();
                freeDrawX = freeDrawOrg.X - clustOrg.X;
                freeDrawY = freeDrawOrg.Y - clustOrg.Y;
            }
        }