Add initial viewport value and if statement for preview display.