|
@@ -908,9 +908,14 @@ import KMComponentLibrary
|
|
|
let editDocument = CPDFDocument.init()
|
|
|
|
|
|
let page = listView.document.page(at: UInt(listView.currentPageIndex))
|
|
|
- editDocument?.insertPageObject(page, at: 0)
|
|
|
|
|
|
+ editDocument?.insertPageObject(page, at: 0)
|
|
|
+ if let editPage = editDocument?.page(at: 0) {
|
|
|
+ editPage.setBounds(CGRectMake(0, 0, editPage.bounds(for: .mediaBox).size.width, editPage.bounds(for: .mediaBox).size.height), for: .cropBox)
|
|
|
+ controller.selectionRect = page?.bounds(for: .cropBox) ?? .zero
|
|
|
+ }
|
|
|
controller.pdfDocument = editDocument
|
|
|
+
|
|
|
controller.reloadData()
|
|
|
|
|
|
}
|
|
@@ -923,9 +928,12 @@ import KMComponentLibrary
|
|
|
cropController = nil
|
|
|
}
|
|
|
|
|
|
- toolbarManager.edit_crop_Property.state = .normal
|
|
|
- pdfToolbarController?.refreshSecondToolbarItemsState()
|
|
|
-
|
|
|
+ if viewManager.subToolMode == .Edit_Crop {
|
|
|
+ viewManager.subToolMode = .None
|
|
|
+ toolbarManager.edit_crop_Property.state = .normal
|
|
|
+ pdfToolbarController?.refreshSecondToolbarItemsState()
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
//MARK: - Watermark水印
|