solid-panes 3.5.21 → 3.5.22-1138b2aa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +0 -0
- package/.eslintignore +0 -0
- package/.eslintrc +1 -1
- package/.github/workflows/ci.yml +0 -1
- package/.nvmrc +1 -1
- package/Documentation/VisualLanguage.html +0 -0
- package/Documentation/conventions.md +0 -0
- package/LICENSE.md +0 -0
- package/README.md +0 -0
- package/dev/index.html +0 -0
- package/dev/loader.ts +1 -1
- package/dev/pane/index.ts +0 -0
- package/doc/images/panes-for-classes.epgz +0 -0
- package/doc/images/panes-for-classes.svg +0 -0
- package/jest.config.js +4 -4
- package/jest.setup.ts +0 -0
- package/lib/RDFXMLPane.js +0 -0
- package/lib/RDFXMLPane.js.map +0 -0
- package/lib/argument/argumentPane.js +0 -0
- package/lib/argument/argumentPane.js.map +0 -0
- package/lib/attach/attachPane.js +0 -0
- package/lib/attach/attachPane.js.map +0 -0
- package/lib/audio/audioPane.js +0 -0
- package/lib/audio/audioPane.js.map +0 -0
- package/lib/classInstancePane.js +0 -0
- package/lib/classInstancePane.js.map +0 -0
- package/lib/dashboard/basicPreferences.d.ts +0 -0
- package/lib/dashboard/basicPreferences.d.ts.map +0 -0
- package/lib/dashboard/basicPreferences.js +0 -0
- package/lib/dashboard/basicPreferences.js.map +0 -0
- package/lib/dashboard/dashboardPane.d.ts +0 -0
- package/lib/dashboard/dashboardPane.d.ts.map +0 -0
- package/lib/dashboard/dashboardPane.js +0 -0
- package/lib/dashboard/dashboardPane.js.map +0 -0
- package/lib/dashboard/homepage.d.ts +0 -0
- package/lib/dashboard/homepage.d.ts.map +0 -0
- package/lib/dashboard/homepage.js +0 -0
- package/lib/dashboard/homepage.js.map +0 -0
- package/lib/dataContentPane.js +0 -0
- package/lib/dataContentPane.js.map +0 -0
- package/lib/defaultPane.js +0 -0
- package/lib/defaultPane.js.map +0 -0
- package/lib/dokieli/dokieliPane.js +0 -0
- package/lib/dokieli/dokieliPane.js.map +0 -0
- package/lib/dokieli/new.js +0 -0
- package/lib/dokieli/new.js.map +0 -0
- package/lib/form/pane.js +0 -0
- package/lib/form/pane.js.map +0 -0
- package/lib/global.d.js +0 -0
- package/lib/global.d.js.map +0 -0
- package/lib/home/homePane.d.ts +0 -0
- package/lib/home/homePane.d.ts.map +0 -0
- package/lib/home/homePane.js +0 -0
- package/lib/home/homePane.js.map +0 -0
- package/lib/humanReadablePane.js +0 -0
- package/lib/humanReadablePane.js.map +0 -0
- package/lib/imagePane.js +0 -0
- package/lib/imagePane.js.map +0 -0
- package/lib/index.d.ts +0 -0
- package/lib/index.d.ts.map +0 -0
- package/lib/index.js +0 -0
- package/lib/index.js.map +0 -0
- package/lib/internal/internalPane.d.ts +0 -0
- package/lib/internal/internalPane.d.ts.map +0 -0
- package/lib/internal/internalPane.js +0 -0
- package/lib/internal/internalPane.js.map +0 -0
- package/lib/mainPage/footer.d.ts +2 -2
- package/lib/mainPage/footer.d.ts.map +1 -1
- package/lib/mainPage/footer.js +0 -0
- package/lib/mainPage/footer.js.map +1 -1
- package/lib/mainPage/header.d.ts +0 -0
- package/lib/mainPage/header.d.ts.map +0 -0
- package/lib/mainPage/header.js +0 -0
- package/lib/mainPage/header.js.map +0 -0
- package/lib/mainPage/index.d.ts +2 -2
- package/lib/mainPage/index.d.ts.map +1 -1
- package/lib/mainPage/index.js +0 -0
- package/lib/mainPage/index.js.map +1 -1
- package/lib/microblogPane/microblogPane.js +0 -0
- package/lib/microblogPane/microblogPane.js.map +0 -0
- package/lib/n3Pane.js +0 -0
- package/lib/n3Pane.js.map +0 -0
- package/lib/outline/context.d.ts +0 -0
- package/lib/outline/context.d.ts.map +0 -0
- package/lib/outline/context.js +0 -0
- package/lib/outline/context.js.map +0 -0
- package/lib/outline/licenseOptions.js +0 -0
- package/lib/outline/licenseOptions.js.map +0 -0
- package/lib/outline/manager.js +37 -80
- package/lib/outline/manager.js.map +1 -1
- package/lib/outline/manager.test.js +0 -0
- package/lib/outline/manager.test.js.map +0 -0
- package/lib/outline/outlineIcons.js +0 -0
- package/lib/outline/outlineIcons.js.map +0 -0
- package/lib/outline/propertyViews.d.ts +0 -0
- package/lib/outline/propertyViews.d.ts.map +0 -0
- package/lib/outline/propertyViews.js +0 -0
- package/lib/outline/propertyViews.js.map +0 -0
- package/lib/outline/propertyViews.test.js +0 -0
- package/lib/outline/propertyViews.test.js.map +0 -0
- package/lib/outline/queryByExample.js +0 -0
- package/lib/outline/queryByExample.js.map +0 -0
- package/lib/outline/userInput.js +0 -0
- package/lib/outline/userInput.js.map +0 -0
- package/lib/outline/viewAsImage.d.ts +0 -0
- package/lib/outline/viewAsImage.d.ts.map +0 -0
- package/lib/outline/viewAsImage.js +0 -0
- package/lib/outline/viewAsImage.js.map +0 -0
- package/lib/outline/viewAsMbox.d.ts +0 -0
- package/lib/outline/viewAsMbox.d.ts.map +0 -0
- package/lib/outline/viewAsMbox.js +0 -0
- package/lib/outline/viewAsMbox.js.map +0 -0
- package/lib/pad/padPane.d.ts +0 -0
- package/lib/pad/padPane.d.ts.map +0 -0
- package/lib/pad/padPane.js +0 -0
- package/lib/pad/padPane.js.map +0 -0
- package/lib/playlist/playlistPane.js +0 -0
- package/lib/playlist/playlistPane.js.map +0 -0
- package/lib/profile/editProfile.view.d.ts +0 -0
- package/lib/profile/editProfile.view.d.ts.map +0 -0
- package/lib/profile/editProfile.view.js +0 -0
- package/lib/profile/editProfile.view.js.map +0 -0
- package/lib/profile/profile.dom.d.ts +0 -0
- package/lib/profile/profile.dom.d.ts.map +0 -0
- package/lib/profile/profile.dom.js +0 -0
- package/lib/profile/profile.dom.js.map +0 -0
- package/lib/registerPanes.js +0 -0
- package/lib/registerPanes.js.map +0 -0
- package/lib/schedule/formsForSchedule.js +0 -0
- package/lib/schedule/formsForSchedule.js.map +0 -0
- package/lib/schedule/schedulePane.js +0 -0
- package/lib/schedule/schedulePane.js.map +0 -0
- package/lib/sharing/sharingPane.d.ts +0 -0
- package/lib/sharing/sharingPane.d.ts.map +0 -0
- package/lib/sharing/sharingPane.js +0 -0
- package/lib/sharing/sharingPane.js.map +0 -0
- package/lib/slideshow/slideshowPane.js +0 -0
- package/lib/slideshow/slideshowPane.js.map +0 -0
- package/lib/socialPane.js +0 -0
- package/lib/socialPane.js.map +0 -0
- package/lib/tabbed/tabbedPane.d.ts +0 -0
- package/lib/tabbed/tabbedPane.d.ts.map +0 -0
- package/lib/tabbed/tabbedPane.js +0 -0
- package/lib/tabbed/tabbedPane.js.map +0 -0
- package/lib/tableViewPane.js +0 -0
- package/lib/tableViewPane.js.map +0 -0
- package/lib/test-import-export/common.js +0 -0
- package/lib/test-import-export/common.js.map +0 -0
- package/lib/test-import-export/edit-importer.js +0 -0
- package/lib/test-import-export/edit-importer.js.map +0 -0
- package/lib/test-import-export/testImportExport.js +0 -0
- package/lib/test-import-export/testImportExport.js.map +0 -0
- package/lib/transaction/pane.js +0 -0
- package/lib/transaction/pane.js.map +0 -0
- package/lib/transaction/period.js +0 -0
- package/lib/transaction/period.js.map +0 -0
- package/lib/trip/tripPane.js +0 -0
- package/lib/trip/tripPane.js.map +0 -0
- package/lib/trustedApplications/trustedApplications.dom.d.ts +0 -0
- package/lib/trustedApplications/trustedApplications.dom.d.ts.map +0 -0
- package/lib/trustedApplications/trustedApplications.dom.js +0 -0
- package/lib/trustedApplications/trustedApplications.dom.js.map +0 -0
- package/lib/trustedApplications/trustedApplications.test.js +0 -0
- package/lib/trustedApplications/trustedApplications.test.js.map +0 -0
- package/lib/trustedApplications/trustedApplications.utils.d.ts +0 -0
- package/lib/trustedApplications/trustedApplications.utils.d.ts.map +0 -0
- package/lib/trustedApplications/trustedApplications.utils.js +0 -0
- package/lib/trustedApplications/trustedApplications.utils.js.map +0 -0
- package/lib/trustedApplications/trustedApplications.view.d.ts +0 -0
- package/lib/trustedApplications/trustedApplications.view.d.ts.map +0 -0
- package/lib/trustedApplications/trustedApplications.view.js +0 -0
- package/lib/trustedApplications/trustedApplications.view.js.map +0 -0
- package/lib/types.d.ts +0 -0
- package/lib/types.d.ts.map +0 -0
- package/lib/types.js +0 -0
- package/lib/types.js.map +0 -0
- package/lib/ui/pane.js +0 -0
- package/lib/ui/pane.js.map +0 -0
- package/lib/versionInfo.d.ts +0 -0
- package/lib/versionInfo.d.ts.map +1 -1
- package/lib/versionInfo.js +14 -14
- package/lib/versionInfo.js.map +1 -1
- package/lib/video/videoPane.js +0 -0
- package/lib/video/videoPane.js.map +0 -0
- package/package.json +36 -43
- package/src/RDFXMLPane.js +0 -0
- package/src/argument/argumentPane.js +0 -0
- package/src/argument/argument_icon_v04.jpg +0 -0
- package/src/argument/icon_argument.png +0 -0
- package/src/argument/transparentyingyang.png +0 -0
- package/src/attach/attachPane.js +0 -0
- package/src/attach/tbl-paperclip-128.png +0 -0
- package/src/attach/tbl-paperclip-22.png +0 -0
- package/src/attach/tbl-paperclip-22a.png +0 -0
- package/src/audio/audioPane.js +0 -0
- package/src/chatPreferencesForm.ttl +0 -0
- package/src/classInstancePane.js +0 -0
- package/src/dashboard/basicPreferences.ts +0 -0
- package/src/dashboard/dashboardPane.ts +0 -0
- package/src/dashboard/homepage.ts +0 -0
- package/src/dashboard/languages/codes.html +0 -0
- package/src/dashboard/languages/codes.xml +0 -0
- package/src/dashboard/languages/codes2.txt +0 -0
- package/src/dashboard/languages/foo +0 -0
- package/src/dashboard/languages/foo.ttl +0 -0
- package/src/dashboard/languages/get-language-names.sh +0 -0
- package/src/dashboard/ontologyData.ttl +0 -0
- package/src/dashboard/preferencesFormText.ttl +0 -0
- package/src/dataContentPane.js +0 -0
- package/src/defaultPane.js +0 -0
- package/src/dokieli/Makefile +0 -0
- package/src/dokieli/dokieliPane.js +0 -0
- package/src/dokieli/new.html +0 -0
- package/src/dokieli/new.js +0 -0
- package/src/form/form-22.png +0 -0
- package/src/form/form-b-22.png +0 -0
- package/src/form/form.graffle +0 -0
- package/src/form/form.png +0 -0
- package/src/form/pane.js +0 -0
- package/src/form/psuedocode-notes.txt +0 -0
- package/src/global.d.ts +0 -0
- package/src/home/homePane.ts +0 -0
- package/src/humanReadablePane.js +0 -0
- package/src/imagePane.js +0 -0
- package/src/index.ts +0 -0
- package/src/internal/internalPane.ts +0 -0
- package/src/mainPage/footer.ts +2 -2
- package/src/mainPage/header.ts +0 -0
- package/src/mainPage/index.ts +2 -2
- package/src/meeting/Makefile +0 -0
- package/src/meeting/test/meeting1/Actions/actions.ttl +0 -0
- package/src/meeting/test/meeting1/Actions/config.ttl +0 -0
- package/src/meeting/test/meeting1/Actions/state.ttl +0 -0
- package/src/meeting/test/meeting1/Schedule/details.ttl +0 -0
- package/src/meeting/test/meeting1/Schedule/details.ttl.acl +0 -0
- package/src/meeting/test/meeting1/Schedule/forms.ttl +0 -0
- package/src/meeting/test/meeting1/Schedule/forms.ttl.acl +0 -0
- package/src/meeting/test/meeting1/Schedule/index.html +0 -0
- package/src/meeting/test/meeting1/Schedule/index.html.acl +0 -0
- package/src/meeting/test/meeting1/Schedule/results.ttl +0 -0
- package/src/meeting/test/meeting1/Schedule/results.ttl.acl +0 -0
- package/src/meeting/test/meeting1/SharedNotes/pad.ttl +0 -0
- package/src/meeting/test/meeting1/chat/chat.ttl +0 -0
- package/src/meeting/test/meeting1/details.ttl +0 -0
- package/src/meeting/test/meeting1/pad/pad.ttl +0 -0
- package/src/microblogPane/mbStyle.css +0 -0
- package/src/microblogPane/microblogPane.js +0 -0
- package/src/n3Pane.js +0 -0
- package/src/outline/context.ts +0 -0
- package/src/outline/licenseOptions.js +0 -0
- package/src/outline/manager.js +6 -55
- package/src/outline/manager.test.ts +0 -0
- package/src/outline/outlineIcons.js +0 -0
- package/src/outline/propertyViews.test.ts +0 -0
- package/src/outline/propertyViews.ts +0 -0
- package/src/outline/queryByExample.js +0 -0
- package/src/outline/userInput.js +0 -0
- package/src/outline/viewAsImage.ts +0 -0
- package/src/outline/viewAsMbox.ts +0 -0
- package/src/pad/images/ColourOff.ai +0 -0
- package/src/pad/images/ColourOff.png +0 -0
- package/src/pad/images/ColourOn.ai +0 -0
- package/src/pad/images/ColourOn.png +0 -0
- package/src/pad/padPane.ts +0 -0
- package/src/playlist/playlistPane.js +0 -0
- package/src/profile/editProfile.view.ts +0 -0
- package/src/profile/profile.dom.ts +0 -0
- package/src/profile/profileFormText.ttl +0 -0
- package/src/registerPanes.js +0 -0
- package/src/schedule/Makefile +0 -0
- package/src/schedule/formsForSchedule.js +0 -0
- package/src/schedule/formsForSchedule.ttl +0 -0
- package/src/schedule/schedulePane.js +0 -0
- package/src/sharing/sharingPane.ts +0 -0
- package/src/slideshow/slideshowPane.js +0 -0
- package/src/socialPane.js +0 -0
- package/src/style/tabbedtab.css +0 -0
- package/src/tabbed/tabbedPane.ts +0 -0
- package/src/tableViewPane.js +0 -0
- package/src/test-import-export/common.js +0 -0
- package/src/test-import-export/edit-importer.js +0 -0
- package/src/test-import-export/testImportExport.js +0 -0
- package/src/transaction/068010-3d-transparent-glass-icon-alphanumeric-dollar-sign.png +0 -0
- package/src/transaction/075988-3d-transparent-glass-icon-business-currency-british-pound-sc35.png +0 -0
- package/src/transaction/22-pixel-068010-3d-transparent-glass-icon-alphanumeric-dollar-sign.png +0 -0
- package/src/transaction/pane.js +0 -0
- package/src/transaction/period.js +0 -0
- package/src/transaction/thumbs_075987-3d-transparent-glass-icon-business-creditcard2.png +0 -0
- package/src/transaction/thumbs_075989-3d-transparent-glass-icon-business-currency-cent-sc35.png +0 -0
- package/src/trip/tripPane.js +0 -0
- package/src/trustedApplications/__snapshots__/trustedApplications.test.ts.snap +0 -0
- package/src/trustedApplications/trustedApplications.dom.ts +0 -0
- package/src/trustedApplications/trustedApplications.test.ts +0 -0
- package/src/trustedApplications/trustedApplications.utils.ts +0 -0
- package/src/trustedApplications/trustedApplications.view.ts +0 -0
- package/src/types.ts +0 -0
- package/src/ui/22-builder.png +0 -0
- package/src/ui/builder.graffle +0 -0
- package/src/ui/builder.png +0 -0
- package/src/ui/builder2.png +0 -0
- package/src/ui/pane.js +0 -0
- package/src/versionInfo.ts +16 -16
- package/src/video/videoPane.js +0 -0
- package/timestamp.sh +0 -0
- package/travis/bumpversion.js +0 -0
- package/tsconfig.json +1 -0
- package/typings/raw-loader.d.ts +0 -0
- package/typings/solid-namespace/index.d.ts +0 -0
- package/webpack.config.js +2 -9
- package/lib/outline/dragDrop.js +0 -406
- package/lib/outline/dragDrop.js.map +0 -1
- package/src/outline/dragDrop.js +0 -444
package/src/outline/dragDrop.js
DELETED
|
@@ -1,444 +0,0 @@
|
|
|
1
|
-
/* istanbul ignore file */
|
|
2
|
-
/**
|
|
3
|
-
This is for outliner features that only work in the extension version, say drag and drop.
|
|
4
|
-
I am always happy creating new files.
|
|
5
|
-
2007.07.11 kennyluck
|
|
6
|
-
2017: Todo: Repace the old Firefox specific code with HTML5 standard code - timbl
|
|
7
|
-
**/
|
|
8
|
-
// Firefox internals:
|
|
9
|
-
/* global Components TransferData TransferDataSet FlavourSet nsTransferable transferUtils */
|
|
10
|
-
|
|
11
|
-
// #includedIn chrome://tabulator/tabulator.xul
|
|
12
|
-
// #require_once chrome://global/nsDragAndDrop.js
|
|
13
|
-
|
|
14
|
-
/* alert(gBrowser);alert(gBrowser.tagName)
|
|
15
|
-
if (!tabulator_gBrowser) {
|
|
16
|
-
var tabulator_wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
|
|
17
|
-
.getService(Components.interfaces.nsIWindowMediator)
|
|
18
|
-
var tabulator_gBrowser = tabulator_wm.getMostRecentWindow("navigator:browser")
|
|
19
|
-
}
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
/* 2007: adapted from dragAndDrop UI Library */
|
|
23
|
-
import { store } from 'solid-logic'
|
|
24
|
-
import * as UI from 'solid-ui'
|
|
25
|
-
import * as $rdf from 'rdflib'
|
|
26
|
-
|
|
27
|
-
const dragAndDrop = (module.exports = {})
|
|
28
|
-
|
|
29
|
-
dragAndDrop.util = {}
|
|
30
|
-
dragAndDrop.util.Event = (function () {
|
|
31
|
-
const listeners = []
|
|
32
|
-
return {
|
|
33
|
-
on: function (el, sType, fn, obj, fnId /* ,override */) {
|
|
34
|
-
const wrappedFn = function (e) {
|
|
35
|
-
return fn.call(obj, e, obj)
|
|
36
|
-
}
|
|
37
|
-
el.addEventListener(sType, wrappedFn, false)
|
|
38
|
-
const li = [el, sType, fnId, wrappedFn]
|
|
39
|
-
listeners.push(li)
|
|
40
|
-
},
|
|
41
|
-
off: function (el, sType, fnId) {
|
|
42
|
-
// removeListener, fnId to identify a function
|
|
43
|
-
const index = this._getCacheIndex(el, sType, fnId)
|
|
44
|
-
if (index === -1) return false
|
|
45
|
-
const cacheItem = listeners[index]
|
|
46
|
-
el.removeEventListener(sType, cacheItem[this.WFN], false)
|
|
47
|
-
|
|
48
|
-
delete listeners[index][this.WFN]
|
|
49
|
-
delete listeners[index][this.FN]
|
|
50
|
-
listeners.splice(index, 1)
|
|
51
|
-
return true
|
|
52
|
-
},
|
|
53
|
-
EL: 0,
|
|
54
|
-
TYPE: 1,
|
|
55
|
-
FNID: 2,
|
|
56
|
-
WFN: 3,
|
|
57
|
-
_getCacheIndex: function (el, sType, fnId) {
|
|
58
|
-
for (let i = 0, len = listeners.length; i < len; ++i) {
|
|
59
|
-
const li = listeners[i]
|
|
60
|
-
if (
|
|
61
|
-
li &&
|
|
62
|
-
li[this.FNID] === fnId &&
|
|
63
|
-
li[this.EL] === el &&
|
|
64
|
-
li[this.TYPE] === sType
|
|
65
|
-
) {
|
|
66
|
-
return i
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
return -1
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
})()
|
|
74
|
-
dragAndDrop.util.DDExternalProxy = function DDExternalProxy (el) {
|
|
75
|
-
this.initTarget(el)
|
|
76
|
-
// dragAndDrop.util.Event.on(this.el, "mousedown", this.handleMouseDown, this, 'dragMouseDown'/*, true*/)
|
|
77
|
-
}
|
|
78
|
-
// dragAndDrop.util.DDExternalProxy extends dragAndDrop.utilDDProxy
|
|
79
|
-
dragAndDrop.util.DDExternalProxy.prototype = {
|
|
80
|
-
initTarget: function (el) {
|
|
81
|
-
// create a local reference to the drag and drop manager
|
|
82
|
-
this.DDM = dragAndDrop.util.DDM
|
|
83
|
-
|
|
84
|
-
// set the el
|
|
85
|
-
this.el = el
|
|
86
|
-
|
|
87
|
-
/*
|
|
88
|
-
// We don't want to register this as the handle with the manager
|
|
89
|
-
// so we just set the id rather than calling the setter.
|
|
90
|
-
this.handleElId = id
|
|
91
|
-
|
|
92
|
-
Event.onAvailable(id, this.handleOnAvailable, this, true)
|
|
93
|
-
*/
|
|
94
|
-
|
|
95
|
-
// the linked element is the element that gets dragged by default
|
|
96
|
-
// this.setDragElId(id)
|
|
97
|
-
|
|
98
|
-
// by default, clicked anchors will not start drag operations.
|
|
99
|
-
// @TODO what else should be here? Probably form fields.
|
|
100
|
-
// this.invalidHandleTypes = { A: "A" }
|
|
101
|
-
// this.invalidHandleIds = {}
|
|
102
|
-
// this.invalidHandleClasses = []
|
|
103
|
-
|
|
104
|
-
// this.applyConfig()
|
|
105
|
-
},
|
|
106
|
-
b4StartDrag: function (x, y) {
|
|
107
|
-
// show the drag frame
|
|
108
|
-
// this.logger.log("start drag show frame, x: " + x + ", y: " + y)
|
|
109
|
-
// alert("test startDrag")
|
|
110
|
-
TabulatorOutlinerObserver.onDragStart(x, y, this.el)
|
|
111
|
-
// this.showFrame(x, y)
|
|
112
|
-
},
|
|
113
|
-
b4Drag: function (_e) {
|
|
114
|
-
// this.setDragElPos(dragAndDrop.util.Event.getPageX(e),
|
|
115
|
-
// dragAndDrop.util.Event.getPageY(e))
|
|
116
|
-
},
|
|
117
|
-
handleMouseDown: function (e, _oDD) {
|
|
118
|
-
const button = e.which || e.button
|
|
119
|
-
if (button > 1) return
|
|
120
|
-
|
|
121
|
-
// firing the mousedown events prior to calculating positions
|
|
122
|
-
// this.b4MouseDown(e)
|
|
123
|
-
// this.onMouseDown(e)
|
|
124
|
-
|
|
125
|
-
// this.DDM.refreshCache(this.groups)
|
|
126
|
-
// var self = this
|
|
127
|
-
// setTimeout( function() { self.DDM.refreshCache(self.groups); }, 0)
|
|
128
|
-
|
|
129
|
-
// Only process the event if we really clicked within the linked
|
|
130
|
-
// element. The reason we make this check is that in the case that
|
|
131
|
-
// another element was moved between the clicked element and the
|
|
132
|
-
// cursor in the time between the mousedown and mouseup events. When
|
|
133
|
-
// this happens, the element gets the next mousedown event
|
|
134
|
-
// regardless of where on the screen it happened.
|
|
135
|
-
// var pt = new dragAndDrop.util.Point(Event.getPageX(e), Event.getPageY(e))
|
|
136
|
-
// if (!this.hasOuterHandles && !this.DDM.isOverTarget(pt, this) ) {
|
|
137
|
-
// this.logger.log("Click was not over the element: " + this.id)
|
|
138
|
-
// } else {
|
|
139
|
-
// if (this.clickValidator(e)) {
|
|
140
|
-
|
|
141
|
-
// set the initial element position
|
|
142
|
-
// this.setStartPosition()
|
|
143
|
-
|
|
144
|
-
// start tracking mousemove distance and mousedown time to
|
|
145
|
-
// determine when to start the actual drag
|
|
146
|
-
this.DDM.handleMouseDown(e, this)
|
|
147
|
-
|
|
148
|
-
// this mousedown is mine
|
|
149
|
-
// this.DDM.stopEvent(e)
|
|
150
|
-
// } else {
|
|
151
|
-
|
|
152
|
-
// this.logger.log("clickValidator returned false, drag not initiated")
|
|
153
|
-
|
|
154
|
-
// }
|
|
155
|
-
// }
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
dragAndDrop.util.DDM = (function DDM () {
|
|
160
|
-
return {
|
|
161
|
-
handleMouseDown: function (e, oDD) {
|
|
162
|
-
// this.currentTarget = dragAndDrop.util.Event.getTarget(e)
|
|
163
|
-
|
|
164
|
-
this.dragCurrent = oDD
|
|
165
|
-
|
|
166
|
-
const el = oDD.el
|
|
167
|
-
|
|
168
|
-
// track start position
|
|
169
|
-
this.startX = e.pageX
|
|
170
|
-
this.startY = e.pageY
|
|
171
|
-
|
|
172
|
-
this.deltaX = this.startX - el.offsetLeft
|
|
173
|
-
this.deltaY = this.startY - el.offsetTop
|
|
174
|
-
|
|
175
|
-
this.dragThreshMet = false
|
|
176
|
-
|
|
177
|
-
// this.clickTimeout = setTimeout(
|
|
178
|
-
// function() {
|
|
179
|
-
// var DDM = dragAndDrop.util.DDM
|
|
180
|
-
// DDM.startDrag(DDM.startX, DDM.startY)
|
|
181
|
-
// },
|
|
182
|
-
// this.clickTimeThresh )
|
|
183
|
-
// dragAndDrop.util.Event.on(el,'mousemove',this.handleMouseMove,this,'dragMouseMove')
|
|
184
|
-
// dragAndDrop.util.Event.on(el,'mouseup' ,this.handleMouseUp ,this,'dragMouseUp')
|
|
185
|
-
},
|
|
186
|
-
|
|
187
|
-
handleMouseMove: function (e) {
|
|
188
|
-
// dragAndDrop.log("handlemousemove")
|
|
189
|
-
if (!this.dragCurrent) {
|
|
190
|
-
// dragAndDrop.log("no current drag obj")
|
|
191
|
-
return true
|
|
192
|
-
}
|
|
193
|
-
// var button = e.which || e.button
|
|
194
|
-
// dragAndDrop.log("which: " + e.which + ", button: "+ e.button)
|
|
195
|
-
|
|
196
|
-
// check for IE mouseup outside of page boundary
|
|
197
|
-
if (dragAndDrop.util.Event.isIE && !e.button) {
|
|
198
|
-
dragAndDrop.log('button failure', 'info', 'DragDropMgr')
|
|
199
|
-
this.stopEvent(e)
|
|
200
|
-
return this.handleMouseUp(e)
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
if (!this.dragThreshMet) {
|
|
204
|
-
const diffX = Math.abs(this.startX - e.pageX)
|
|
205
|
-
const diffY = Math.abs(this.startY - e.pageY)
|
|
206
|
-
// dragAndDrop.log("diffX: " + diffX + "diffY: " + diffY)
|
|
207
|
-
if (diffX > this.clickPixelThresh || diffY > this.clickPixelThresh) {
|
|
208
|
-
// dragAndDrop.log("pixel threshold met", "info", "DragDropMgr")
|
|
209
|
-
this.startDrag(this.startX, this.startY)
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
if (this.dragThreshMet) {
|
|
214
|
-
// this.dragCurrent.b4Drag(e)
|
|
215
|
-
// this.dragCurrent.onDrag(e)
|
|
216
|
-
// this.fireEvents(e, false)
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
e.preventDefault()
|
|
220
|
-
// this.stopEvent(e)
|
|
221
|
-
|
|
222
|
-
return true
|
|
223
|
-
},
|
|
224
|
-
handleMouseUp: function (e) {
|
|
225
|
-
if (!this.dragCurrent) return // Error...
|
|
226
|
-
dragAndDrop.util.Event.off(
|
|
227
|
-
this.dragCurrent.el,
|
|
228
|
-
'mousemove',
|
|
229
|
-
'dragMouseMove'
|
|
230
|
-
)
|
|
231
|
-
// there are two mouseup for unknown reason...
|
|
232
|
-
dragAndDrop.util.Event.off(this.dragCurrent.el, 'mouseup', 'dragMouseUp')
|
|
233
|
-
dragAndDrop.util.Event.off(this.dragCurrent.el, 'mouseup', 'dragMouseUp')
|
|
234
|
-
// have to do this as attribute ondragdrop does not recognize any dragdrop event
|
|
235
|
-
// initialized inside <tabbrowser> (strange, I think)
|
|
236
|
-
if (this.dragThreshMet) {
|
|
237
|
-
TabulatorOutlinerObserver.onDropInside(e.target)
|
|
238
|
-
this.dragThreshMet = false
|
|
239
|
-
}
|
|
240
|
-
this.dragCurrent = null
|
|
241
|
-
},
|
|
242
|
-
startDrag: function (x, y) {
|
|
243
|
-
// dragAndDrop.log("firing drag start events", "info", "DragDropMgr")
|
|
244
|
-
// clearTimeout(this.clickTimeout)
|
|
245
|
-
if (this.dragCurrent) {
|
|
246
|
-
this.dragCurrent.b4StartDrag(x, y)
|
|
247
|
-
// this.dragCurrent.startDrag(x, y)
|
|
248
|
-
}
|
|
249
|
-
this.dragThreshMet = true
|
|
250
|
-
},
|
|
251
|
-
clickPixelThresh: 3
|
|
252
|
-
}
|
|
253
|
-
})()
|
|
254
|
-
|
|
255
|
-
// ToDos
|
|
256
|
-
// 1.Recover normal funtionality
|
|
257
|
-
// 2.Investigate into Gecko drag and drop
|
|
258
|
-
// 3.Cross Tag Drag And Drop
|
|
259
|
-
// 4.Firefox native rdf store
|
|
260
|
-
const TabulatorOutlinerObserver = {
|
|
261
|
-
onDrop: function (e, aXferData, _dragSession) {
|
|
262
|
-
const selection = UI.utils.ancestor(
|
|
263
|
-
UI.utils.ancestor(e.originalTarget, 'TABLE').parentNode,
|
|
264
|
-
'TABLE'
|
|
265
|
-
).outline.selection
|
|
266
|
-
const contentType = aXferData.flavour.contentType
|
|
267
|
-
const url = transferUtils.retrieveURLFromData(aXferData.data, contentType)
|
|
268
|
-
if (!url) return
|
|
269
|
-
if (contentType === 'application/x-moz-file') {
|
|
270
|
-
if (aXferData.data.fileSize === 0) {
|
|
271
|
-
const templateDoc = $rdf.sym(
|
|
272
|
-
'chrome://tabulator/content/internalKnowledge.n3#defaultNew'
|
|
273
|
-
)
|
|
274
|
-
store.copyTo(templateDoc, $rdf.sym(url))
|
|
275
|
-
/*
|
|
276
|
-
function WriteToFileRepresentedBy (subject){
|
|
277
|
-
var outputFormulaTerm=kb.any(subject,OWL('unionOf'))
|
|
278
|
-
var theClass = kb.constructor.SuperClass
|
|
279
|
-
var outputFormula= theClass.instances[kb.the(outputFormulaTerm,tabont('accesskey')).value]
|
|
280
|
-
}
|
|
281
|
-
*/
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
const targetTd = selection[0]
|
|
285
|
-
const table = UI.utils.ancestor(
|
|
286
|
-
UI.utils.ancestor(targetTd, 'TABLE').parentNode,
|
|
287
|
-
'TABLE'
|
|
288
|
-
)
|
|
289
|
-
const thisOutline = table.outline
|
|
290
|
-
thisOutline.UserInput.insertTermTo(targetTd, $rdf.sym(url))
|
|
291
|
-
},
|
|
292
|
-
|
|
293
|
-
onDragEnter: function (e, _dragSession) {
|
|
294
|
-
// enter or exit something
|
|
295
|
-
let selection
|
|
296
|
-
try {
|
|
297
|
-
selection = UI.utils.ancestor(
|
|
298
|
-
UI.utils.ancestor(e.originalTarget, 'TABLE').parentNode,
|
|
299
|
-
'TABLE'
|
|
300
|
-
).outline.selection
|
|
301
|
-
} catch (e) {
|
|
302
|
-
/* because e.orginalTarget is not defined */ return
|
|
303
|
-
}
|
|
304
|
-
for (
|
|
305
|
-
let targetTd = e.originalTarget;
|
|
306
|
-
targetTd;
|
|
307
|
-
targetTd = targetTd.parentNode
|
|
308
|
-
) {
|
|
309
|
-
if (targetTd.tabulatorSelect) {
|
|
310
|
-
if (selection[0]) {
|
|
311
|
-
try {
|
|
312
|
-
selection[0].tabulatorDeselect()
|
|
313
|
-
} catch (e) {
|
|
314
|
-
throw new Error(selection[0] + ' causes ' + e)
|
|
315
|
-
}
|
|
316
|
-
dragAndDrop.util.Event.off(targetTd, 'mouseup', 'dragMouseUp')
|
|
317
|
-
}
|
|
318
|
-
targetTd.tabulatorSelect()
|
|
319
|
-
// dragAndDrop.util.Event.on(targetTd,'mouseup',this.DDM.handleMouseUp,this.DDM,'dragMouseUp')
|
|
320
|
-
break
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
},
|
|
324
|
-
|
|
325
|
-
onDragExit: function (_e, _dragSession) {
|
|
326
|
-
// if (e.originalTarget.tabulatorDeselect) e.originalTarget.tabulatorDeselect()
|
|
327
|
-
},
|
|
328
|
-
onDropInside: function (targetTd) {
|
|
329
|
-
// a special case that you draganddrop totally inside a <tabbrowser>
|
|
330
|
-
// var selection = ancestor(ancestor(targetTd,'TABLE').parentNode,'TABLE').outline.selection
|
|
331
|
-
// var targetTd=selection[0]
|
|
332
|
-
const table = targetTd.ownerDocument.getElementById('outline')
|
|
333
|
-
// var table=ancestor(ancestor(targetTd,'TABLE').parentNode,'TABLE')
|
|
334
|
-
const thisOutline = table.outline
|
|
335
|
-
thisOutline.UserInput.insertTermTo(
|
|
336
|
-
targetTd,
|
|
337
|
-
UI.utils.getAbout(store, this.dragTarget)
|
|
338
|
-
)
|
|
339
|
-
},
|
|
340
|
-
onDragStart: function (x, y, td) {
|
|
341
|
-
/* seeAlso nsDragAndDrop.js::nsDragAndDrop.startDrag */
|
|
342
|
-
// ToDo for myself: understand the connections in firefox, x, screenX
|
|
343
|
-
|
|
344
|
-
this.dragTarget = td
|
|
345
|
-
const kDSIID = Components.interfaces.nsIDragService
|
|
346
|
-
const dragAction = {
|
|
347
|
-
action:
|
|
348
|
-
kDSIID.DRAGDROP_ACTION_COPY +
|
|
349
|
-
kDSIID.DRAGDROP_ACTION_MOVE +
|
|
350
|
-
kDSIID.DRAGDROP_ACTION_LINK
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
// alert(td.ownerDocument.getBoxObjectFor(td))
|
|
354
|
-
// alert(td.ownerDocument.getBoxObjectFor(td).screenX)
|
|
355
|
-
const tdBox = td.ownerDocument.getBoxObjectFor(td) // nsIBoxObject
|
|
356
|
-
const region = Components.classes['@mozilla.org/gfx/region;1'].createInstance(
|
|
357
|
-
Components.interfaces.nsIScriptableRegion
|
|
358
|
-
)
|
|
359
|
-
region.init() // this is important
|
|
360
|
-
region.unionRect(tdBox.screenX, tdBox.screenY, tdBox.width, tdBox.height)
|
|
361
|
-
let transferDataSet = { data: null }
|
|
362
|
-
const term = UI.Util.getTerm(td)
|
|
363
|
-
switch (term.termType) {
|
|
364
|
-
case 'NamedNode':
|
|
365
|
-
transferDataSet.data = this.URItoTransferDataSet(term.uri)
|
|
366
|
-
break
|
|
367
|
-
case 'BlankNode':
|
|
368
|
-
transferDataSet.data = this.URItoTransferDataSet(term.toNT())
|
|
369
|
-
break
|
|
370
|
-
case 'Literal':
|
|
371
|
-
transferDataSet.data = this.URItoTransferDataSet(term.value)
|
|
372
|
-
break
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
transferDataSet = transferDataSet.data // quite confusing, anyway...
|
|
376
|
-
const transArray = Components.classes[
|
|
377
|
-
'@mozilla.org/supports-array;1'
|
|
378
|
-
].createInstance(Components.interfaces.nsISupportsArray)
|
|
379
|
-
const trans = nsTransferable.set(transferDataSet.dataList[0])
|
|
380
|
-
transArray.AppendElement(
|
|
381
|
-
trans.QueryInterface(Components.interfaces.nsISupports)
|
|
382
|
-
)
|
|
383
|
-
this.mDragService.invokeDragSession(
|
|
384
|
-
td,
|
|
385
|
-
transArray,
|
|
386
|
-
region,
|
|
387
|
-
dragAction.action
|
|
388
|
-
)
|
|
389
|
-
},
|
|
390
|
-
/*
|
|
391
|
-
onDragStart: function(aEvent,aXferData,aDragAction){
|
|
392
|
-
var dragTarget=ancestor(aEvent.target,'TD')
|
|
393
|
-
//var nt=dragTarget.getAttribute('about')
|
|
394
|
-
//ToDo:text terms
|
|
395
|
-
var term=getAbout(kb,dragTarget)
|
|
396
|
-
aXferData.data = this.URItoTransferDataSet(term.uri)
|
|
397
|
-
alert("start")
|
|
398
|
-
},
|
|
399
|
-
*/
|
|
400
|
-
|
|
401
|
-
getSupportedFlavours: function () {
|
|
402
|
-
const flavourSet = new FlavourSet()
|
|
403
|
-
// flavourSet.appendFlavour("text/rdfitem")
|
|
404
|
-
// flavourSet.appendFlavour("moz/rdfitem")
|
|
405
|
-
flavourSet.appendFlavour('text/x-moz-url')
|
|
406
|
-
flavourSet.appendFlavour('text/unicode')
|
|
407
|
-
flavourSet.appendFlavour('application/x-moz-file', 'nsIFile')
|
|
408
|
-
return flavourSet
|
|
409
|
-
},
|
|
410
|
-
|
|
411
|
-
URItoTransferDataSet: function (uri) {
|
|
412
|
-
const dataSet = new TransferDataSet()
|
|
413
|
-
const data = new TransferData()
|
|
414
|
-
data.addDataForFlavour('text/x-moz-url', uri)
|
|
415
|
-
data.addDataForFlavour('text/unicode', uri)
|
|
416
|
-
dataSet.push(data)
|
|
417
|
-
return dataSet
|
|
418
|
-
},
|
|
419
|
-
_mDS: null,
|
|
420
|
-
get_mDragService: function () {
|
|
421
|
-
// some syntax I don't understand -- was get mDragService()
|
|
422
|
-
if (!this._mDS) {
|
|
423
|
-
const kDSContractID = '@mozilla.org/widget/dragservice;1'
|
|
424
|
-
const kDSIID = Components.interfaces.nsIDragService
|
|
425
|
-
this._mDS = Components.classes[kDSContractID].getService(kDSIID)
|
|
426
|
-
}
|
|
427
|
-
return this._mDS
|
|
428
|
-
},
|
|
429
|
-
DDM: dragAndDrop.util.DDM
|
|
430
|
-
}
|
|
431
|
-
/*
|
|
432
|
-
var ondraging=false; //global variable indicating whether ondraging (better choice?)
|
|
433
|
-
var testGlobal = function test(e){alert(e.originalTarget);e.originalTarget.className='selected';e.preventDefault();}
|
|
434
|
-
var activateDrag = function (e){
|
|
435
|
-
if (!ondraging){
|
|
436
|
-
alert('activate test')
|
|
437
|
-
ondraging=true
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
*/
|
|
441
|
-
// tabulator_gBrowser.setAttribute('ondragdrop','testGlobal(event)')
|
|
442
|
-
// tabulator_gBrowser.setAttribute('ondragenter','activateDrag(event)')
|
|
443
|
-
|
|
444
|
-
// gBrowser.addEventListener('dragdrop',test,true)
|