@ascua/contextmenu 0.1.6 → 0.2.0

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.
@@ -51,18 +51,18 @@ export default class extends Service {
51
51
  document.addEventListener('contextmenu', (e) => {
52
52
  try {
53
53
  switch (true) {
54
- case e.target.isContentEditable:
55
- this.prep(document.body, e, {}, 'application/menu/text');
56
- this.show(document.body, e, {}, 'application/menu/text');
57
- break;
58
- case e.target.matches('input,textarea'):
59
- this.prep(document.body, e, {}, 'application/menu/text');
60
- this.show(document.body, e, {}, 'application/menu/text');
61
- break;
62
- default:
63
- this.prep(document.body, e, {}, 'application/menu/main');
64
- this.show(document.body, e, {}, 'application/menu/main');
65
- break;
54
+ case e.target.isContentEditable:
55
+ this.prep(document.body, e, {}, 'application/menu/text');
56
+ this.show(document.body, e, {}, 'application/menu/text');
57
+ break;
58
+ case e.target.matches('input,textarea'):
59
+ this.prep(document.body, e, {}, 'application/menu/text');
60
+ this.show(document.body, e, {}, 'application/menu/text');
61
+ break;
62
+ default:
63
+ this.prep(document.body, e, {}, 'application/menu/main');
64
+ this.show(document.body, e, {}, 'application/menu/main');
65
+ break;
66
66
  }
67
67
  } catch (e) {
68
68
  // Ignore
@@ -70,7 +70,7 @@ export default class extends Service {
70
70
  });
71
71
 
72
72
  document.addEventListener('mousedown', (e) => {
73
- if ( !e.target.matches('context-menu-item') ) {
73
+ if (!e.target.matches('context-menu-item')) {
74
74
  this.hide();
75
75
  }
76
76
  });
@@ -157,14 +157,14 @@ export default class extends Service {
157
157
 
158
158
  this.load(name, model);
159
159
 
160
- setTimeout( () => {
160
+ setTimeout(() => {
161
161
 
162
162
  // Fetch remote variables
163
163
  const window = Remote.getCurrentWindow();
164
164
  const session = window.webContents.session;
165
165
 
166
166
  // Build the menu from the template.
167
- let menu = Remote.Menu.buildFromTemplate( this.items.map(list) );
167
+ let menu = Remote.Menu.buildFromTemplate(this.items.map(list));
168
168
 
169
169
  // Check to see if there are dictionary suggestions
170
170
  if (vars.dictionarySuggestions && vars.dictionarySuggestions.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ascua/contextmenu",
3
- "version": "0.1.6",
3
+ "version": "0.2.0",
4
4
  "description": "Small description for @ascua/contextmenu goes here",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -12,11 +12,11 @@
12
12
  "license": "MIT",
13
13
  "author": {
14
14
  "name": "Tobie Morgan Hitchcock",
15
- "url": "https://abcum.com"
15
+ "url": "https://surrealdb.com"
16
16
  },
17
17
  "dependencies": {
18
- "@ascua/decorators": "^0.1.6",
19
- "@ascua/modifiers": "^0.1.6",
18
+ "@ascua/decorators": "^0.2.0",
19
+ "@ascua/modifiers": "^0.2.0",
20
20
  "ember-cli-babel": "^7.26.6",
21
21
  "ember-cli-htmlbars": "^5.7.1"
22
22
  },
@@ -27,5 +27,5 @@
27
27
  "publishConfig": {
28
28
  "access": "public"
29
29
  },
30
- "gitHead": "dddd6a72e00a3c66bfc856933a8d05c48d6627a5"
30
+ "gitHead": "15ac1610df327477e4cde680162812196d462303"
31
31
  }