개정판 6b6e937c
Compare기능 수정
Change-Id: I3697fbe30f47d5cc4a51ece85df0055f7c596bf2
KCOM/Controls/AdornerFinal.xaml.cs | ||
---|---|---|
1143 | 1143 |
UndoCommand.Instance.Push(comments, this.AngleValue); |
1144 | 1144 |
} |
1145 | 1145 |
|
1146 |
private async void DragThumb_DragDelta(object sender, DragDeltaEventArgs e)
|
|
1146 |
private void DragThumb_DragDelta(object sender, DragDeltaEventArgs e) |
|
1147 | 1147 |
{ |
1148 | 1148 |
double scale = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.zoomAndPanControl.ContentScale; |
1149 | 1149 |
var tmp = Mouse.GetPosition(Window.GetWindow((DependencyObject)sender)); |
... | ... | |
1156 | 1156 |
//System.Diagnostics.Debug.WriteLine($"TransItem : {horzChange}, {vertChange}"); |
1157 | 1157 |
//System.Diagnostics.Debug.WriteLine($"DragDeltaEventArgs : {e.HorizontalChange}, {e.VerticalChange}"); |
1158 | 1158 |
|
1159 |
|
|
1160 |
|
|
1161 |
await this.TranslateItemsAync(horzChange, vertChange); |
|
1159 |
this.TranslateItems(horzChange, vertChange); |
|
1162 | 1160 |
|
1163 | 1161 |
var rect = this.AdornerBorder.Bounds(ViewerDataModel.Instance.SystemMain.dzMainMenu.mainPanel); |
1164 | 1162 |
var mainRect = ViewerDataModel.Instance.SystemMain.dzMainMenu.mainPanel.Rect(); |
... | ... | |
1170 | 1168 |
|
1171 | 1169 |
if ((horzChange < 0 && !moveDirection.Left) || (horzChange > 0 && !moveDirection.Right)) |
1172 | 1170 |
{ |
1173 |
await this.TranslateItemsAync(horzChange * -1, 0); |
|
1174 |
|
|
1171 |
this.TranslateItems(horzChange * -1, 0); |
|
1175 | 1172 |
e.Handled = true; |
1176 | 1173 |
} |
1177 | 1174 |
|
1178 | 1175 |
if ((vertChange < 0 && !moveDirection.Up) || (vertChange > 0 && !moveDirection.Down)) |
1179 | 1176 |
{ |
1180 |
await this.TranslateItemsAync( 0, vertChange * -1);
|
|
1177 |
this.TranslateItems( 0, vertChange * -1);
|
|
1181 | 1178 |
e.Handled = true; |
1182 | 1179 |
} |
1183 | 1180 |
} |
... | ... | |
1192 | 1189 |
/// translate all members |
1193 | 1190 |
/// </summary> |
1194 | 1191 |
/// <param name="e"></param> |
1195 |
public async Task TranslateItemsAync(double dx, double dy) |
|
1196 |
{ |
|
1197 |
await Dispatcher.InvokeAsync((Action)(() => |
|
1198 |
{ |
|
1199 |
foreach (var item in this.Members) |
|
1200 |
{ |
|
1201 |
this.TranslateItem(dx, dy, item); |
|
1202 |
} |
|
1203 |
|
|
1204 |
this.BorderUpdate(); |
|
1205 |
})); |
|
1206 |
} |
|
1207 | 1192 |
public void TranslateItems(double dx, double dy) |
1208 | 1193 |
{ |
1209 | 1194 |
Dispatcher.BeginInvoke((Action)(() => |
... | ... | |
1561 | 1546 |
DragThumb.Visibility = Visibility.Collapsed; |
1562 | 1547 |
} |
1563 | 1548 |
} |
1549 |
|
|
1564 | 1550 |
} |
1565 | 1551 |
} |
내보내기 Unified diff