Skip to content

Commit

Permalink
fix(dialogs): progress towards making dialogs drag/droppable
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickocoffeyo committed Aug 3, 2018
1 parent 25d8a4a commit a4a0eb4
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 103 deletions.
19 changes: 13 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,18 @@
"url": "https://github.com/editvr/editvr-frontend.git"
},
"release": {
"verifyConditions": ["@semantic-release/github"],
"publish": ["@semantic-release/github"],
"success": ["@semantic-release/github"],
"fail": ["@semantic-release/github"]
"verifyConditions": [
"@semantic-release/github"
],
"publish": [
"@semantic-release/github"
],
"success": [
"@semantic-release/github"
],
"fail": [
"@semantic-release/github"
]
},
"dependencies": {
"@editvr/aframe-dialog-popup-component": "^1.2.0",
Expand Down Expand Up @@ -97,8 +105,7 @@
"lint": "eslint --ext .jsx,.js .",
"commitmsg": "commitlint -e $GIT_PARAMS",
"test:debug": "react-scripts --inspect-brk test --runInBand --env=jsdom",
"precommit":
"lint-staged -c lint-staged.config.js ; yarn lint ; yarn test:ci"
"precommit": "lint-staged -c lint-staged.config.js ; yarn lint ; yarn test:ci"
},
"devDependencies": {
"@commitlint/cli": "^6.2.0",
Expand Down
88 changes: 0 additions & 88 deletions src/aframe/components/clickDrag.refactor.js

This file was deleted.

17 changes: 11 additions & 6 deletions src/aframe/components/dialogPopup.container.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
/* globals AFRAME */
import { equals } from 'ramda';

import openIconImage from '../../assets/icons/info.jpg';
import closeIconImage from '../../assets/icons/close.jpg';

import { MODE_COMPONENT_PLACING } from '../../constants';
import connectRedux from '../utils/connectRedux';
import connectRouter from '../utils/connectRouter';
import openIconImage from '../../assets/icons/info.jpg';
import closeIconImage from '../../assets/icons/close.jpg';

/**
* AFrame component that spawns dialog components whenever it's initialized,
Expand Down Expand Up @@ -62,7 +62,7 @@ const dialogPopupContainer = {
},
router: {
match: {
params: { sceneSlug }
params: { sceneSlug, editorMode }
}
}
} = this;
Expand All @@ -84,10 +84,15 @@ const dialogPopupContainer = {
bodyColor: 'white',
bodyFont: 'roboto',
dialogBoxColor: '#127218',
active: true,
openIconImage,
closeIconImage
closeIconImage,
};

if (editorMode === MODE_COMPONENT_PLACING) {
dialogPopup.active = false;
}

if (component.field_image) {
const {
field_image: {
Expand All @@ -112,7 +117,7 @@ AFRAME.registerComponent(
}))(
connectRouter(
dialogPopupContainer,
'/experience/vreditor/:experienceSlug/:sceneSlug'
'/experience/vreditor/:experienceSlug/:sceneSlug/:editorMode?'
)
)
);
5 changes: 4 additions & 1 deletion src/aframe/entities/scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import React from 'react';
import aframe from 'aframe/src';

import registerClickDrag from '../components/clickDrag';

require('@editvr/aframe-dialog-popup-component');
require('aframe-look-at-component');
require('../components/spawnSky');
Expand All @@ -16,9 +18,10 @@ require('../components/spawnDialogs');
require('../components/dialogPopup.container');
require('../components/navLink');
require('../components/isEditable');
require('../components/clickDrag.refactor');
require('../components/isDraggable');

registerClickDrag(aframe);

export default () => (
<a-scene
embedded
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@
find-up "^2.1.0"

"@editvr/aframe-dialog-popup-component@^1.2.0":
version "1.7.0"
resolved "https://registry.yarnpkg.com/@editvr/aframe-dialog-popup-component/-/aframe-dialog-popup-component-1.7.0.tgz#358181b6b333be50ae8e86f0f3ccac606bc9405b"
version "1.7.2"
resolved "https://registry.yarnpkg.com/@editvr/aframe-dialog-popup-component/-/aframe-dialog-popup-component-1.7.2.tgz#bbaf617f229da1432cb297bf1bfd20439f72ed86"
dependencies:
"@commitlint/config-angular" "^7.0.1"

Expand Down

0 comments on commit a4a0eb4

Please sign in to comment.