kopia lustrzana https://github.com/OpenDroneMap/WebODM
Updated plugin code to work with newer webpack
rodzic
df1696f61e
commit
e5604aa3c0
|
@ -39,6 +39,13 @@ export default class ApiFactory{
|
||||||
this.events.addListener(`${api.namespace}::${eventName}`, args => {
|
this.events.addListener(`${api.namespace}::${eventName}`, args => {
|
||||||
Promise.all(callbackOrDeps.map(dep => SystemJS.import(dep)))
|
Promise.all(callbackOrDeps.map(dep => SystemJS.import(dep)))
|
||||||
.then((...deps) => {
|
.then((...deps) => {
|
||||||
|
|
||||||
|
// For each dependency, see if it exports a default module (ES6 style)
|
||||||
|
// if it does, export just the default module, otherwise export all modules
|
||||||
|
deps = deps.map(dep => {
|
||||||
|
return dep.map(exp => exp.default ? exp.default : exp);
|
||||||
|
});
|
||||||
|
|
||||||
const response = {
|
const response = {
|
||||||
result: callbackOrUndef(...(Array.from([args]).concat(...deps))),
|
result: callbackOrUndef(...(Array.from([args]).concat(...deps))),
|
||||||
placeholder: args._placeholder
|
placeholder: args._placeholder
|
||||||
|
|
|
@ -4,7 +4,7 @@ import './MeasurePopup.scss';
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import L from 'leaflet';
|
import L from 'leaflet';
|
||||||
|
|
||||||
module.exports = class MeasurePopup extends React.Component {
|
export default class MeasurePopup extends React.Component {
|
||||||
static defaultProps = {
|
static defaultProps = {
|
||||||
map: {},
|
map: {},
|
||||||
model: {},
|
model: {},
|
||||||
|
|
|
@ -7,7 +7,7 @@ import ReactDOM from 'ReactDOM';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
|
|
||||||
module.exports = class App{
|
export default class App{
|
||||||
constructor(map){
|
constructor(map){
|
||||||
this.map = map;
|
this.map = map;
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import Storage from 'webodm/classes/Storage';
|
||||||
import ErrorMessage from 'webodm/components/ErrorMessage';
|
import ErrorMessage from 'webodm/components/ErrorMessage';
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
|
|
||||||
module.exports = class ShareButton extends React.Component{
|
export default class ShareButton extends React.Component{
|
||||||
static defaultProps = {
|
static defaultProps = {
|
||||||
task: null,
|
task: null,
|
||||||
token: ""
|
token: ""
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from 'react'; // can import React
|
import React from 'react'; // can import React
|
||||||
|
|
||||||
module.exports = {
|
export default {
|
||||||
es6func: () => {} // ES6 transpiler works
|
es6func: () => {} // ES6 transpiler works
|
||||||
};
|
};
|
Ładowanie…
Reference in New Issue