Maybe you don't understand my question but I got it..
Just adding these 2 lines after scaling the panel..
panel.pos_x = 177 + ((bmap_width(panel.bmap)/2) - ((bmap_width(panel.bmap)/2)*panel.scale_x));
panel.pos_y = 324.5 + ((bmap_height(panel.bmap)/2) - ((bmap_height(panel.bmap)/2)*panel.scale_y));
where 177 is the original x position
324.5 is the original y position
of the panel at normal scale