Browse Source

【fix】【注释】添加手绘注释,注释列表注释的时间和页码会重叠

tangchao 6 months ago
parent
commit
c3483aeabf

+ 4 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMNoteTableViewCell.swift

@@ -111,6 +111,8 @@ class KMNoteTableViewCell: NSTableCellView {
         self.annotationContentLabel.cell?.truncatesLastVisibleLine = true
         self.annotationContentLabel.isEditable = false
         
+//        self.noteImageView.imageScaling = .scaleAxesIndependently
+        
         NotificationCenter.default.addObserver(self, selector: #selector(_contextDidEndEdit), name: NSControl.textDidEndEditingNotification, object: self.annotationContentLabel)
          
          
@@ -307,6 +309,7 @@ extension KMNoteTableViewCell {
                     self.annotationContentLabel.stringValue = returnString
                 } else {
                     self.annotationContentLabel.isHidden = true
+                    self.contentView.isHidden = true
                     
                     self.noteImageView.isHidden = false
                     let anno = note as! CPDFStampAnnotation
@@ -314,6 +317,7 @@ extension KMNoteTableViewCell {
                 }
             } else if let anno = data as? CPDFSignatureAnnotation {
                 self.annotationContentLabel.isHidden = true
+                self.contentView.isHidden = true
                 
                 self.noteImageView.isHidden = false
                 self.noteImageView.image = anno.signImage

+ 1 - 2
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/LeftSideView.xib

@@ -1274,7 +1274,7 @@
                                                 </constraints>
                                             </customView>
                                             <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="zkB-0O-cuV">
-                                                <rect key="frame" x="16" y="12" width="192" height="61"/>
+                                                <rect key="frame" x="16" y="12" width="0.0" height="61"/>
                                                 <constraints>
                                                     <constraint firstAttribute="height" constant="61" id="hms-0M-GIs"/>
                                                 </constraints>
@@ -1291,7 +1291,6 @@
                                             <constraint firstAttribute="trailing" secondItem="Pnc-2Q-X2x" secondAttribute="trailing" constant="9" id="Sjk-E8-SlY"/>
                                             <constraint firstItem="mv9-xH-dgE" firstAttribute="leading" secondItem="3TS-lp-G7v" secondAttribute="leading" id="aWn-yv-ia6"/>
                                             <constraint firstItem="udQ-rE-Njy" firstAttribute="leading" secondItem="3TS-lp-G7v" secondAttribute="leading" constant="16" id="ebM-dJ-RE4"/>
-                                            <constraint firstItem="zkB-0O-cuV" firstAttribute="trailing" secondItem="mv9-xH-dgE" secondAttribute="trailing" id="mD3-UI-kd6"/>
                                             <constraint firstItem="zkB-0O-cuV" firstAttribute="top" secondItem="mv9-xH-dgE" secondAttribute="top" id="o5h-AD-Csk"/>
                                             <constraint firstAttribute="bottom" secondItem="mv9-xH-dgE" secondAttribute="bottom" constant="12" id="rPt-rv-YAR"/>
                                         </constraints>