djaodjin-annotate | Simple jquery plugin to annotate a screenshot | Frontend Framework library
kandi X-RAY | djaodjin-annotate Summary
kandi X-RAY | djaodjin-annotate Summary
djaodjin-annotate.js is a simple jquery plugin allowing you to annotate a screenshot. Try the live demo on DjaoDjin blog.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Initialize an annotation .
- Creates new data object .
- Compare two nodes .
- no - op
- not IE support
- hashes
- Check if a element is div .
- helper for updating attributes
- Functionality for parsing
- Fetches the dropdown
djaodjin-annotate Key Features
djaodjin-annotate Examples and Code Snippets
Community Discussions
Trending Discussions on djaodjin-annotate
QUESTION
I've tried to do everything in angular and not use jQuery. Unfortunately, there's one component that requires it. However, I would like to only load the jQuery plugin .js file on that component (so it's not being loaded everywhere...)
I have done the following
- npm install jquery --save
- npm install --save-dev @types/jquery
- Update Angular-cli.json > scripts > jQuery.min.js
Questions
- Is it worth just loading the plugin in the index file?
- If not, how is it possible to load the plugin file on the one component that's going to use it?
Any assistance would be much appreciated.
UPDATE
I've loaded the jQuery plugin as mentioned in the answer, but there's an error on:
'$("#myCanvas").annotate(options);'
[ts] Property 'annotate' does not exist on type 'JQuery'.
Is there a disconnect between the loaded file and the typescript file?
...ANSWER
Answered 2018-Feb-13 at 11:51constructor() {
this.loadJQuery()
const script = document.getElementById('dynamicScript')
script.onload = //Do your thing now
}
loadJquery(): void {
const jQueryCdnUrl = `jquerycdn`;
const node = document.createElement('script');
node.src = jQueryCdnUrl;
node.type = 'text/javascript';
node.async = false;
node.id = 'dynamicScript'
node.charset = 'utf-8';
document.getElementsByTagName('head')[0].appendChild(node);
}
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install djaodjin-annotate
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page