프로젝트

일반

사용자정보

개정판 f3ab410f

IDf3ab410f8451624fda6c768a806a4cf023b5ba10
상위 8de55603
하위 39f208de

김태성이(가) 약 4년 전에 추가함

markus 화살표텍스트박스 수정

Change-Id: Ia91a1979b4dbc5c612e44372eeff654eb48d8fd8

차이점 보기:

KCOM/Controls/AdornerFinal.xaml.cs
1256 1256
        private void DragThumb_DragDelta(object sender, DragDeltaEventArgs e)
1257 1257
        {
1258 1258
            double scale = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.zoomAndPanControl.ContentScale;
1259
            var tmp = Mouse.GetPosition(Window.GetWindow((DependencyObject)sender));
1260 1259

  
1261
            var horzChange = (tmp.X - this.CurrentMousePoint.X) / scale;/// Math.Round(tmp.X - this.CurrentMousePoint.X) / scale;
1262
            var vertChange = (tmp.Y - this.CurrentMousePoint.Y) / scale;///Math.Round(tmp.Y - this.CurrentMousePoint.Y) / scale;
1260
            var newMousePoint = Mouse.GetPosition(Window.GetWindow((DependencyObject)sender));
1261
         
1262
            var horzChange = (newMousePoint.X - this.CurrentMousePoint.X) / scale;/// Math.Round(tmp.X - this.CurrentMousePoint.X) / scale;
1263
            var vertChange = (newMousePoint.Y - this.CurrentMousePoint.Y) / scale;///Math.Round(tmp.Y - this.CurrentMousePoint.Y) / scale;
1264

  
1263 1265
            try
1264 1266
            {
1265 1267
                DragThumb.Cursor = Cursors.SizeAll;
1266 1268
                //System.Diagnostics.Debug.WriteLine($"TransItem : {horzChange}, {vertChange}");
1267 1269
                //System.Diagnostics.Debug.WriteLine($"DragDeltaEventArgs : {e.HorizontalChange}, {e.VerticalChange}");
1268 1270

  
1269
                
1270

  
1271
                var rect = this.AdornerBorder.Bounds(ViewerDataModel.Instance.SystemMain.dzMainMenu.mainPanel);
1272

  
1273
                var mainRect = ViewerDataModel.Instance.SystemMain.dzMainMenu.mainPanel.Rect();
1274

  
1275
                var moveDirection = mainRect.Movement(rect);
1276

  
1277
                System.Diagnostics.Debug.WriteLine($"horzChange: {horzChange} , vertChange:{vertChange}");
1278
                System.Diagnostics.Debug.WriteLine($"DragDeltaEventArgs : Top:{rect.Top}, Left:{rect.Left}, Right:{rect.Right}, Bottom:{rect.Bottom} ,BottomLeft : {rect.BottomLeft} BottomRight : {rect.BottomRight}");
1279

  
1280
                if ((horzChange < 0 && !moveDirection.Left) || (horzChange > 0 && !moveDirection.Right))
1281
                {
1282
                    horzChange = 0;
1283
                }
1284 1271

  
1285
                if ((vertChange < 0 && !moveDirection.Up) || (vertChange > 0 && !moveDirection.Down))
1286
                {
1287
                    vertChange = 0;
1288
                }
1272
                //var mainRect = ViewerDataModel.Instance.SystemMain.dzMainMenu.mainPanel.Rect();
1273
                
1274
                //var rect = (this.ContainerContent.FindChildByType<CommentUserInfo>() as CommentUserInfo).ItemRect; //this.AdornerBorder.Bounds(ViewerDataModel.Instance.SystemMain.dzMainMenu.mainPanel);
1275

  
1276
                //var rotationRect = MathHelper.RotateRect(rect,new Point(mainRect.Width/2, mainRect.Height/2), ViewerDataModel.Instance.PageAngle);
1277

  
1278
                //if(ViewerDataModel.Instance.PageAngle == 270 || ViewerDataModel.Instance.PageAngle == 90)
1279
                //{
1280
                //    mainRect = new Rect(0,0, mainRect.Height, mainRect.Width);
1281
                //}
1282

  
1283
                //var moveDirection = mainRect.Movement(rotationRect);
1284

  
1285
                //System.Diagnostics.Debug.WriteLine($"horzChange: {horzChange} , vertChange:{vertChange}");
1286
                ////System.Diagnostics.Debug.WriteLine($"DragDeltaEventArgs : Top:{rect.Top}, Left:{rect.Left}, Right:{rect.Right}, Bottom:{rect.Bottom} ,BottomLeft : {rect.BottomLeft} BottomRight : {rect.BottomRight}");
1287

  
1288
                //if (!mainRect.Contains(rotationRect) && Math.Abs(horzChange) > 0)
1289
                //{
1290
                //    if ((horzChange < 0 && !moveDirection.Left) || (horzChange > 0 && !moveDirection.Right))
1291
                //    {
1292
                //        //this.TranslateItems(horzChange * -1, 0);
1293
                //        //e.Handled = true;
1294
                //        horzChange = 0;
1295
                //        newMousePoint.X = this.CurrentMousePoint.X;
1296
                //    }
1297
                //}
1298

  
1299
                //if (!mainRect.Contains(rotationRect) && Math.Abs(vertChange) > 0)
1300
                //{
1301
                //    if ((vertChange < 0 && !moveDirection.Up) || (vertChange > 0 && !moveDirection.Down))
1302
                //    {
1303
                //        //this.TranslateItems(0, vertChange * -1);
1304
                //        //e.Handled = true;
1305
                //        vertChange = 0;
1306
                //        newMousePoint.Y = this.CurrentMousePoint.Y;
1307
                //    }
1308
                //}
1289 1309

  
1290 1310
                this.TranslateItems(horzChange, vertChange);
1291

  
1292

  
1293 1311
            }
1294 1312
            finally
1295 1313
            {
1296 1314
                /// update CurrentMousePoint
1297
                this.CurrentMousePoint = tmp;
1315
                this.CurrentMousePoint = newMousePoint;
1298 1316
            }
1299 1317
        }
1300 1318

  

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)