import { ImageryDecorator } from './index' ; import { IBaseImageryPluginConstructor , IImageryPluginMetaData } from '../model/base-imagery-plugin' ; import { AutoSubscriptions } from 'auto-subscriptions' ; export function ImageryPlugin ( metaData ) { return function ( constructor ) { ImageryDecorator ( metaData ) ( constructor ) ; if ( ! constructor . prototype [ 'AutoSubscriptionsActive' ] ) { constructor . prototype [ 'AutoSubscriptionsActive' ] = true ; AutoSubscriptions ( { init : 'onInitSubscriptions' , destroy : 'onDispose' } ) ( constructor ) ; } } ; }