Просмотр исходного кода

【幻灯片】翻页undo操作相关

dinglingui 5 месяцев назад
Родитель
Сommit
13e7a3d370

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/MainWindowController/KMPresentationTopViewController.swift

@@ -161,8 +161,8 @@ public class KMPresentationTopViewController: NSViewController, KMDrawViewDelega
             pageNubLabel.stringValue =  "\((pdfView?.currentPageIndex ?? 0) + 1)/\(pdfView?.document.pageCount ?? 0)"
             updatePageState()
             let presentationDrawView = pdfView?.presentationDrawView
+            presentationDrawView?.clear() //
             presentationDrawView?.resetUndoManager()
-            presentationDrawView?.clear()
         }
     }
     

+ 3 - 3
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.m

@@ -258,7 +258,7 @@ NSNotificationName const CPDFListViewDisplayModeChangeNotification = @"CPDFListV
 
 - (KMDrawView *)CreatePresentationDrawView {
     if(!_presentationDrawView) {
-        float scale = 6;//放大比例,越大可能会卡顿
+        float scale = 3;//放大比例,越大可能会卡顿
         _presentationDrawView = [[KMDrawView alloc] initWithFrame:CGRectMake(0, 0,
                                                                      scale * self.bounds.size.width,
                                                                      scale * self.bounds.size.height)];
@@ -269,7 +269,7 @@ NSNotificationName const CPDFListViewDisplayModeChangeNotification = @"CPDFListV
         _presentationDrawView.frame = self.bounds;
 
         _presentationDrawView.renderColor = [NSColor blackColor];
-        _presentationDrawView.radius = 100;
+        _presentationDrawView.radius = 50;
         _presentationDrawView.hidden = YES;
 
     }
@@ -1529,8 +1529,8 @@ NSNotificationName const CPDFListViewDisplayModeChangeNotification = @"CPDFListV
 }
 
 - (void)resetPresentationDrawMode {
-    [_presentationDrawView resetUndoManager];
     [_presentationDrawView clear];
+    [_presentationDrawView resetUndoManager];
 }
 
 - (void)exitPresentationDrawMode {

+ 5 - 0
PDF Office/PDF Master/Class/README.md

@@ -68,6 +68,11 @@
 2. Office 程序没有运行 [检查 NSAppleScript 开发注意项里的 1. 2. 3.]
 ... 
 
+## KMDrawViewSDK_Mac.framework
+    drawView?.clear() 
+    drawView?.resetUndoManager()
+    操作时留意先后顺序,避免undo操作还可以点击
+            
 ## 代码注释
 
 //TODO: 标示有功能代码待编写 -