     
 }
 
-class GZPositionEditView:GZPositionView, UIScrollViewDelegate {
+class GZPositionEditView:GZPositionView {
+    
+    let minZoomScale: CGFloat = 1.0
+    let maxZoomScale: CGFloat = 3.0
+    
+    var imageViewRatio: CGFloat = 1.0
+    
+    
+    var metaData:GZPositionViewMetaData{
+        
+        set{
+            self.imageMetaData = newValue.imageMetaData
+            self.scrollViewMetaData = newValue.scrollViewMetaData
+        }
+        
+        get{
+            return GZPositionViewMetaData(imageMetaData: self.imageMetaData, scrollViewMetaData: self.scrollViewMetaData)
+        }
+    }
+    
+    var scrollViewMetaData:GZScrollViewMetaData{
+        
+        set{
+            
+            self.scrollView.zoomScale = newValue.zoomScale
+            self.scrollView.contentSize = newValue.contentSize
+            self.scrollView.contentOffset = newValue.contentOffset
+            
+        }
+        
+        get{
+            return GZScrollViewMetaData(scrollView: self.scrollView)
+        }
+        
+    }
+    
+    var imageMetaData:GZPositionViewImageMetaData{
+        
+        set{
+            self.setImage(newValue.image, needResetScrollView: true)
+        }
+        
+        get{
+            return GZPositionViewImageMetaData(identifier: self.identifier, image: self.image)
+        }
+        
+    }
     
     var image:UIImage?{
         
         set{
-            self.imageView.image = newValue
-            
-            
-            if let parentLayoutView = self.layoutView {
-                
-                var imageMetaData = parentLayoutView.privateObjectInfo.imageMetaData
-                
-                if let newImage = newValue {
-                    imageMetaData[self.identifier] = newImage
-                }else{
-                    imageMetaData.removeValueForKey(self.identifier)
-                }
-                
-                parentLayoutView.privateObjectInfo.imageMetaData = imageMetaData
-                
-            }
-            
+            self.setImage(newValue, needResetScrollView: true)
         }
         
         get{

    var metaData:GZLayoutViewMetaData?{
        
        get{
            var metaData:[NSObject:AnyObject!] = [:]
            var savedImageMetaData = self.privateObjectInfo.imageMetaData
            
            var exportImages:[String:UIImage] = [:]
            
            for position in self.layout.positions{
                
                
                if let image = savedImageMetaData[position.identifier]{
                    exportImages[position.identifier] = image
                }
                
            }

            metaData[GZImageLayoutViewMetaDataImagesKey] = exportImages
            metaData[GZImageLayoutViewMetaDataLayoutKey] = self.layout
            
            return GZLayoutViewMetaData(content: metaData)
        }
        
        set{
            
            
            
            if let newMetaData = newValue {
                
                var layout:GZLayout = newMetaData.layout

        }
    }
    
    var positionViews:[String:GZPositionEditView] = [:]
    
    var cameraView:GZCameraView{
        return self.highlighView.cameraView
