bea26a3abd
Add union type to accept both the old object format {type, value} and
the new enum format for backwards compatibility with existing drawings.