if (!inited && model != null && model.getDimensions() != null && model.getTopLeftPosition() != null) {
// initializes zoom
Dimension dimensions = model.getDimensions();
Point topLeftPostition = model.getTopLeftPosition();
Vector box = new Vector((float) dimensions.getWidth(), (float) dimensions.getHeight());
float ratioWidth = width / box.x;
float ratioHeight = height / box.y;
scaling = ratioWidth < ratioHeight ? ratioWidth : ratioHeight;
// initializes move
Vector semiBox = Vector.div(box, 2);
Vector topLeftVector = new Vector((float) topLeftPostition.x, (float) topLeftPostition.y);
Vector center = new Vector(width / 2f, height / 2f);
Vector scaledCenter = Vector.add(topLeftVector, semiBox);
trans.set(center);
trans.sub(scaledCenter);
// lastMove.set(trans);
inited = true;