-
Notifications
You must be signed in to change notification settings - Fork 11
Legacy Wrapper
Robert King edited this page Aug 21, 2020
·
1 revision
This component acts as a wrapper for libraries such as d3 or p5.js which expects to have full control of the DOM beneath a certain element and thus is useful when converting old visualizations to the new library.
In order to utilize this wrapper the file that is included needs to default export function which will be executed on the component load. This function also conveniently will encapsulate any var
keywords used inside of it to prevent access to globals.
<template>
<iv-legacy-wrapper :execute="legacyCode" />
</template>
<script>
import legacyCode from './legacyCode.js'
export default {
data(){
return { legacyCode }
}
}
</script>
Tagname: iv-legacy-wrapper
- execute [Function] - Function to execute when this component is loaded
- src [String - not working] - String to path of file containing an exported function
- id [String] - ID of the div which will be automatically created by the legacy wrapper