             for palette in palettes {
                 startingPosition = draw(palette: palette,
                                         ctx: ctx,
-                                        dimension: (widthPerTile, heightPerTile),
+                                        dimension: (widthPerBox, heightPerBox),
                                         startingPosition: startingPosition)
                 counter = counter + 1
                 

        }
        
        self.numberOfPalettes = palettes.count
        widthPerTile = self.frame.size.width/CGFloat(numberOfColorsHorizontally)
        
        //TODO: Must round in case of odd number
        let numberOfPalettes = numberOfColorsHorizontally/numberOfColorsPerPalette

    private var numberOfPalettes = 1
    private var numberOfColorsPerPalette: Int = 1
    
    private var widthPerBox: CGFloat = 0
    private var heightPerBox: CGFloat = 0
    private var numberOfRows = 1
    
    var boxSelected: (Int, Int) = (0,0)
    var boxSelectionSize = 1
    
    required init?(coder: NSCoder) {
        super.init(coder: coder)
    }
