Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@types/mini-css-extract-plugin": "^2.2.0",
"@types/mustache": "^4.1.2",
"@types/webpack-dev-server": "^4.1.0",
"@workadventure/iframe-api-typings": "^1.4.14",
"@workadventure/iframe-api-typings": "^1.7.1",
"copy-webpack-plugin": "^9.0.1",
"cross-env": "^7.0.3",
"css-loader": "^5.2.4",
Expand Down
4 changes: 2 additions & 2 deletions src/Features/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function initConfigurationPanel(openConfigVariables: string, properties: Propert
WA.nav.closeCoWebSite();
}

WA.room.onEnterZone(zoneName, () => {
WA.room.onEnterLayer(zoneName).subscribe(() => {
const openConfigTriggerValue = properties.getString("openConfigTrigger");

// Do not display conf panel if the user is not allowed by tag
Expand All @@ -80,7 +80,7 @@ function initConfigurationPanel(openConfigVariables: string, properties: Propert
}
});

WA.room.onLeaveZone(zoneName, () => {
WA.room.onLeaveLayer(zoneName).subscribe(() => {
if (actionMessage) {
actionMessage.remove();
closeConfigurationPanel();
Expand Down
8 changes: 4 additions & 4 deletions src/Features/doors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function initDoorstep(
}
}

WA.room.onEnterZone(zoneName, () => {
WA.room.onEnterLayer(zoneName).subscribe(() => {
inZone = true;
if (properties.getBoolean("autoOpen") && allowed) {
WA.state[doorVariable.name] = true;
Expand All @@ -211,7 +211,7 @@ function initDoorstep(
}
});

WA.room.onLeaveZone(zoneName, () => {
WA.room.onLeaveLayer(zoneName).subscribe(() => {
inZone = false;
if (properties.getBoolean("autoClose")) {
WA.state[doorVariable.name] = false;
Expand Down Expand Up @@ -278,7 +278,7 @@ function initBellLayer(bellVariable: string, properties: Properties): void {

const bellPopupName = properties.getString("bellPopup");

WA.room.onEnterZone(zoneName, () => {
WA.room.onEnterLayer(zoneName).subscribe(() => {
if (!bellPopupName) {
WA.state[bellVariable] = (WA.state[bellVariable] as number) + 1;
} else {
Expand All @@ -293,7 +293,7 @@ function initBellLayer(bellVariable: string, properties: Properties): void {
}
});

WA.room.onLeaveZone(zoneName, () => {
WA.room.onLeaveLayer(zoneName).subscribe(() => {
if (popup) {
popup.close();
popup = undefined;
Expand Down
4 changes: 2 additions & 2 deletions src/Features/variable_actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function setupVariableActionLayer(
}

if (enterValue !== undefined) {
WA.room.onEnterZone(zone, () => {
WA.room.onEnterLayer(zone).subscribe(() => {
if (triggerMessage) {
// TODO WHEN WA.ui.displayMessage is merged!
//WA.ui.
Expand All @@ -41,7 +41,7 @@ function setupVariableActionLayer(
});
}
if (leaveValue !== undefined) {
WA.room.onLeaveZone(zone, () => {
WA.room.onLeaveLayer(zone).subscribe(() => {
WA.state[variableName] = leaveValue;
});
}
Expand Down