|
@@ -9,13 +9,15 @@ import Cocoa
|
|
|
|
|
|
typealias KMAnnotationSelfSignViewControllerCallBack = (CAnnotationType) -> Void
|
|
|
|
|
|
-class KMAnnotationSelfSignViewController: NSViewController {
|
|
|
+@objcMembers class KMAnnotationSelfSignViewController: NSViewController {
|
|
|
|
|
|
var _annotations: [KMSelfSignAnnotation]?
|
|
|
var selfSignType: CAnnotationType = .signText
|
|
|
var pdfview: CPDFListView?
|
|
|
var callBack: KMAnnotationSelfSignViewControllerCallBack?
|
|
|
-
|
|
|
+ var pdfView: CPDFListView?
|
|
|
+ var annotationModel: CPDFAnnotationModel?
|
|
|
+
|
|
|
@IBOutlet var colorLabel: NSTextField!
|
|
|
@IBOutlet var imageBox: NSBox!
|
|
|
@IBOutlet var imageBoxTop: NSLayoutConstraint!
|
|
@@ -105,14 +107,16 @@ class KMAnnotationSelfSignViewController: NSViewController {
|
|
|
lineWidthView.isHidden = true
|
|
|
lineWidthViewTopConstraint.constant = -6 - lineWidthView.bounds.size.height
|
|
|
}
|
|
|
-
|
|
|
- if annotations.count > 1 {
|
|
|
- imageBoxTop.constant = -imageBox.bounds.size.height
|
|
|
- imageBox.isHidden = true
|
|
|
- } else {
|
|
|
- imageBoxTop.constant = 10
|
|
|
- imageBox.isHidden = false
|
|
|
- }
|
|
|
+
|
|
|
+// if annotationModel?.annotations != nil {
|
|
|
+// if (annotationModel?.annotations.count)! > 0 {
|
|
|
+// imageBoxTop.constant = -imageBox.bounds.size.height
|
|
|
+// imageBox.isHidden = true
|
|
|
+// } else {
|
|
|
+// imageBoxTop.constant = 10
|
|
|
+// imageBox.isHidden = false
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
// PickView Configuration
|
|
|
colorPickView.annotationType = .selfSignColors
|
|
@@ -371,7 +375,7 @@ class KMAnnotationSelfSignViewController: NSViewController {
|
|
|
imageView.image = drawImage(with: selfSignType)
|
|
|
}
|
|
|
|
|
|
- @IBAction func buttonClickedTypeSwitch(_ sender: NSButton) {
|
|
|
+ @IBAction func buttonClicked_TypeAwitch(_ sender: NSButton) {
|
|
|
let tag = sender.tag
|
|
|
|
|
|
for tAnnotation in annotations {
|