Do not collapse cards on links and code area #88
Detects clickable elements automatically and exempts them from collapsing cards, also interacting with code area does no longer collapse cards. This commit also fixes subscribing to clicks on document every time card list is loaded, but never unsubscribing. This impacts performance and causes memory leaks. Now, registered event listener is removed every time card list component is destroyed.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
<template>
|
||||
<Responsive v-on:sizeChanged="sizeChanged()">
|
||||
<Responsive
|
||||
v-on:sizeChanged="sizeChanged()"
|
||||
v-non-collapsing>
|
||||
<div
|
||||
:id="editorId"
|
||||
class="code-area"
|
||||
@@ -18,11 +20,13 @@ import { ScriptingLanguage } from '@/domain/ScriptingLanguage';
|
||||
import { ICategoryCollectionState } from '@/application/Context/State/ICategoryCollectionState';
|
||||
import { CodeBuilderFactory } from '@/application/Context/State/Code/Generation/CodeBuilderFactory';
|
||||
import Responsive from '@/presentation/components/Shared/Responsive.vue';
|
||||
import { NonCollapsing } from '@/presentation/components/Scripts/View/Cards/NonCollapsingDirective';
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
Responsive,
|
||||
},
|
||||
directives: { NonCollapsing },
|
||||
})
|
||||
export default class TheCodeArea extends StatefulVue {
|
||||
public readonly editorId = 'codeEditor';
|
||||
|
||||
Reference in New Issue
Block a user