private axel getBlockAxel(blockNode block, connectedEdge edge) {
        //now we can use the other constuctor to create a rotated block
        //If the top edge is connected to, switch height and width around
        int width = 0;
        int height = 0;
        switch (edge) {
            case Top:
            case Bottom:
                width = block.height;
                height = block.width;
                break;
            case Left:
                width = block.width;
                height = block.height;
                break;
            case Right:
                width = block.width;
                height = block.height;
                break;
        }
        blockNode newBlock = new blockNode(block, width, height, graphNodeType.ghostBlock);
        newBlock.ptrans = block.ptrans;
        //newBlock.resetTransformation();
        newBlock.type = graphNodeType.ghostBlock;
        
        double transY = computeBlockTranslationOnMagnet(block.getAnchoredPolygon().p, getAnchoredPolygon().p, edge);
        if (edge == connectedEdge.Top) {
            transY =transY;
        } else if (edge == connectedEdge.Bottom) {
            transY = transY;
        } else if (edge == connectedEdge.Left) {
            transY = -transY;
        } else if (edge == connectedEdge.Right) {
            transY = transY+height;
        }
        
        newBlock.thisY = transY;
        newBlock.parent = this;
        newBlock.ptrans = trans;
        
        //newBlock.resetTransformation();
        
        return new axel(newBlock, nextNodes.get(0).x, nextNodes.get(0).y);
    }