make preview work with locator

The preview should now work with the locator feature