瀏覽代碼

【右边栏】- 属性面板,多选不显示预览图

liaoxiaoyue 1 年之前
父節點
當前提交
78bada7310

+ 22 - 2
PDF Office/PDF Office/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMGeneralAnnotationViewController.m

@@ -400,7 +400,12 @@
 #pragma mark - private
 
 - (void)hiddenSubviews {
-    self.generaImageTopLayoutConstraint.constant = self.inkView.hidden ?  -(self.inkView.bounds.size.height) : 16.0f;
+    if(self.generalImageBoxView.hidden) {
+        self.generaImageTopLayoutConstraint.constant = -(self.generalImageBoxView.bounds.size.height) - (self.inkView.bounds.size.height);
+    } else {
+        self.generaImageTopLayoutConstraint.constant = self.inkView.hidden ?  -(self.inkView.bounds.size.height) : 16.0f;
+    }
+    
     self.fontDefaultTopConstraint.constant = self.defaultFontView.hidden ? -(self.defaultFontView.bounds.size.height) : 16.0f;
     self.figureTopConstraint.constant = self.figureView.hidden ? -(self.figureView.bounds.size.height) : 8.0f;
     self.fontViewTopConstraint.constant = self.fontView.hidden ? -(self.fontView.bounds.size.height) : 8.0f;
@@ -434,6 +439,13 @@
     } else {
         self.inkView.hidden = YES;
     }
+    
+    if (self.annotationModel.annotations.count > 1) {
+        self.generalImageBoxView.hidden = YES;
+    } else {
+        self.generalImageBoxView.hidden = NO;
+    }
+    
     self.noteStyleView.hidden = YES;
     self.borderOpacityView.hidden = YES;
 
@@ -686,7 +698,9 @@
 - (void)updateOpacityView
 {
     CGFloat opacity = self.annotationModel.opacity;
-    
+    if(self.annotationModel.annotations.count > 1) {
+        opacity = self.annotationModel.annotation.opacity;
+    }
     if (CAnnotationTypeCircle == _annotationType ||
         CAnnotationTypeSquare == _annotationType) {
         opacity = self.annotationModel.interiorOpacity;
@@ -772,6 +786,9 @@
 
 - (void)updateFillColorPickerVC
 {
+    if (self.annotationModel.annotations.count > 1) {
+        return;
+    }
     NSColor *color = nil;
     if (CAnnotationTypeCircle == _annotationType ||
         CAnnotationTypeSquare == _annotationType) {
@@ -859,6 +876,9 @@
 
 - (void)updateBorderColorPickerVC
 {
+    if (self.annotationModel.annotations.count > 1) {
+        return;
+    }
     NSColor *color = self.annotationModel.color;
     CGFloat red,green,blue,alpha;
     [[color colorUsingColorSpaceName:NSCalibratedRGBColorSpace] getRed:&red green:&green blue:&blue alpha:&alpha];