Update MainView top alignment, enable JS source maps, and refine build scripts
Set `top` alignment in `MainView` to a fixed value for consistent rendering. Enabled source maps with embedded source content in the JS compiler for improved debugging. Adjusted build script directory paths and formatting for better clarity and maintainability.
This commit is contained in:
@@ -39,7 +39,7 @@ kotlin {
|
|||||||
sourceSets {
|
sourceSets {
|
||||||
val commonMain by getting {
|
val commonMain by getting {
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("nl.astraeus:vst-worklet-base:1.0.1")
|
implementation("nl.astraeus:vst-worklet-base:1.0.1")
|
||||||
implementation("nl.astraeus:midi-arrays:0.3.6")
|
implementation("nl.astraeus:midi-arrays:0.3.6")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import org.jetbrains.kotlin.gradle.dsl.JsSourceMapEmbedMode
|
||||||
import java.nio.file.Files
|
import java.nio.file.Files
|
||||||
import java.nio.file.Paths
|
import java.nio.file.Paths
|
||||||
|
|
||||||
@@ -16,6 +17,8 @@ kotlin {
|
|||||||
js {
|
js {
|
||||||
compilerOptions {
|
compilerOptions {
|
||||||
target.set("es2015")
|
target.set("es2015")
|
||||||
|
sourceMap.set(true)
|
||||||
|
sourceMapEmbedSources.set(JsSourceMapEmbedMode.SOURCE_MAP_SOURCE_CONTENT_ALWAYS)
|
||||||
}
|
}
|
||||||
//useEsModules()
|
//useEsModules()
|
||||||
//useCommonJs()
|
//useCommonJs()
|
||||||
@@ -29,7 +32,7 @@ kotlin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
distribution {
|
distribution {
|
||||||
outputDirectory.set(File("$projectDir/web1/"))
|
outputDirectory.set(File("$projectDir/web1"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -419,7 +419,7 @@ class MainView : Komponent() {
|
|||||||
|
|
||||||
val scale = if (scaleX < scaleY) scaleX else scaleY
|
val scale = if (scaleX < scaleY) scaleX else scaleY
|
||||||
val left = (vpWidth - containerWidth * scale) / 2
|
val left = (vpWidth - containerWidth * scale) / 2
|
||||||
val top = (vpHeight - containerHeight * scale) / 2
|
val top = 0 // (vpHeight - containerHeight * scale) / 2
|
||||||
|
|
||||||
return "transform: translate(${left}px, ${top}px) scale($scale);"
|
return "transform: translate(${left}px, ${top}px) scale($scale);"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user