Skip to content

Commit

Permalink
Disable external modules that eat memory #155
Browse files Browse the repository at this point in the history
  • Loading branch information
fnoop committed Mar 17, 2020
1 parent 29dffa7 commit 30f82c1
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 20 deletions.
8 changes: 6 additions & 2 deletions src/components/modules/cockpit/CockpitModule.vue
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
<template lang='pug'>
v-content.cockpit-layout(:key="activeApi")
cockpit-map(v-if="mapState")
cockpit-renderer(v-if="hudState")
// cockpit-map(v-if="mapState")
// cockpit-renderer(v-if="hudState")
cockpit-container
cockpit-hud
</template>

<script>
/*
import CockpitRenderer from './CockpitRenderer.vue'
import CockpitContainer from './CockpitContainer.vue'
import CockpitHud from './CockpitHud.vue'
import CockpitMap from './CockpitMap.vue'
*/
export default {
name: 'CockpitModule',
components: {
/*
CockpitRenderer,
CockpitContainer,
CockpitHud,
CockpitMap
*/
},
data () {
return {}
Expand Down
2 changes: 1 addition & 1 deletion src/components/modules/cockpit/CockpitRenderer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ div.cockpit-hud

<script>
import Vue from 'vue'
import * as PIXI from 'pixi.js'
// import * as PIXI from 'pixi.js'
export default {
data () {
Expand Down
6 changes: 4 additions & 2 deletions src/components/modules/maverick/ConfigurationCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<script>
//https://stackoverflow.com/questions/58592128/how-can-i-integrate-monaco-with-vue-js
import * as monaco from 'monaco-editor'
// import * as monaco from 'monaco-editor'
export default {
name: 'ConfigurationCard',
Expand All @@ -42,6 +42,7 @@ export default {
},
},
mounted() {
/*
var randomString = Math.random().toString(36).substring(7)
var modelUri = monaco.Uri.parse(window.location.hostname + ":" + window.location.port + "/" + randomString + "/config.json"); // a made up unique URI for our model
var model = monaco.editor.createModel(this.monacoCode, "json", modelUri);
Expand All @@ -62,9 +63,10 @@ export default {
automaticLayout: true,
scrollBeyondLastLine: false
})
*/
},
destroyed() {
this.editor.dispose()
// this.editor.dispose()
},
}
Expand Down
12 changes: 6 additions & 6 deletions src/components/modules/planner/PlannerModule.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<template lang='pug'>
v-container
planner2d(v-if="!plannerViewState")
planner3d(v-if="plannerViewState")
// planner2d(v-if="!plannerViewState")
// planner3d(v-if="plannerViewState")
</template>

<script>
import Planner2d from './Planner2d'
import Planner3d from './Planner3d'
// import Planner2d from './Planner2d'
// import Planner3d from './Planner3d'
export default {
name: 'PlannerModule',
components: {
Planner2d,
Planner3d
// Planner2d
// Planner3d
},
data () {
return {}
Expand Down
6 changes: 3 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import store from './store'

// Load extra plugins
import vuetify from '@/plugins/vuetify'
import './plugins/vuelayers'
import './plugins/vuecesium'
// import './plugins/vuelayers'
// import './plugins/vuecesium'
import './plugins/vuetimers'
import './plugins/vuelodash'
import './plugins/vuebar'
import './plugins/vuevisibility'
import './plugins/registerServiceWorker'
// import './plugins/registerServiceWorker'
import { createProvider } from './plugins/graphql/vue-apollo'

// Load maverick plugins
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/mavlink/MavlinkMeta.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import mavlinkEnums from './mavlinkEnumData.json'
// import mavlinkEnums from './mavlinkEnumData.json'

const plugin = {
install (Vue, options) {
Expand Down
4 changes: 2 additions & 2 deletions src/store/modules/maverick.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { schema } from '../modules/schema'
// import { schema } from '../modules/schema'

const state = {
monacoSchema: schema,
// monacoSchema: schema,
monacoCode: [
"{",
" ",
Expand Down
3 changes: 0 additions & 3 deletions vue.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin')

module.exports = {

"transpileDependencies": [
Expand All @@ -8,7 +6,6 @@ module.exports = {

configureWebpack: {
plugins: [
new MonacoWebpackPlugin()
],
externals: { ws: "WebSocket"},
},
Expand Down

0 comments on commit 30f82c1

Please sign in to comment.