mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-08 01:13:27 +01:00
tpi plugin
This commit is contained in:
parent
557ff168df
commit
2bd771a4a3
4 changed files with 14 additions and 4 deletions
|
|
@ -15,6 +15,7 @@ import * as CraftPlugin from '../craft/craftPlugin';
|
|||
import * as StoragePlugin from '../storagePlugin';
|
||||
import * as ProjectPlugin from '../projectPlugin';
|
||||
import * as SketcherPlugin from '../sketch/sketcherPlugin';
|
||||
import * as tpiPlugin from '../tpiPlugin';
|
||||
|
||||
|
||||
import * as PartModellerPlugin from '../part/partModellerPlugin';
|
||||
|
|
@ -37,7 +38,8 @@ export default function startApplication(callback) {
|
|||
OperationPlugin,
|
||||
CadRegistryPlugin,
|
||||
CraftPlugin,
|
||||
SketcherPlugin
|
||||
SketcherPlugin,
|
||||
tpiPlugin
|
||||
];
|
||||
|
||||
let plugins = [
|
||||
|
|
|
|||
8
web/app/cad/tpiPlugin.js
Normal file
8
web/app/cad/tpiPlugin.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import TPI from './tpi'
|
||||
|
||||
/*
|
||||
* TPI stands for the Test Program Interface
|
||||
*/
|
||||
export function activate({services}) {
|
||||
services.TPI = TPI;
|
||||
}
|
||||
4
web/app/utils/jqueryfy.js
vendored
4
web/app/utils/jqueryfy.js
vendored
|
|
@ -1,6 +1,6 @@
|
|||
import $ from 'jquery'
|
||||
|
||||
// Usage of jquery is totally deprecated. It exists only to support legacy code and
|
||||
// will be gone soon after complete transition to React.
|
||||
// Usage of jquery is absolutely deprecated. It exists only to support legacy code(2d sketcher and test framework) and
|
||||
// will be gone soon after complete transition to React. Main application never uses jquery.
|
||||
|
||||
window.jQuery = window.$ = $;
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ export function load(url, callback) {
|
|||
$(function() { // fire event when iframe is ready
|
||||
frame.load(function() {
|
||||
const win = frame.get(0).contentWindow;
|
||||
callback(win, win.__CAD_APP)
|
||||
callback(win, {TPI: win.__CAD_APP.services.tpi})
|
||||
});
|
||||
});
|
||||
frame.attr('src', window.location.origin + url)
|
||||
|
|
|
|||
Loading…
Reference in a new issue