Function to rescale dimenions of events.
This commit is contained in:
parent
e107e34164
commit
c2e2079818
|
@ -40,4 +40,15 @@ class AppModel extends Model {
|
||||||
return $daemon_status;
|
return $daemon_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function reScale( $dimension, $dummy) {
|
||||||
|
$scale_base = Configure::read('SCALE_BASE');
|
||||||
|
for ( $i = 1; $i < func_num_args(); $i++ ) {
|
||||||
|
$scale = func_get_arg( $i );
|
||||||
|
if ( !empty($scale) && $scale != $scale_base ) {
|
||||||
|
$dimension = (int)(($dimension*$scale)/$scale_base);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return( $dimension );
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue