We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
i got some trouble using this package.
I use this code snippet:
import Vue from '../../../../node_modules/vue/dist/vue.esm' import resize from 'vue-resize-directive' export default Vue.component( 'MyResizableComponent', { template: ` <div v-resize="onResize"></div> `, directives: { resize }, methods: { onResize ( event ) { const domElement = this.$el console.log(`client(w/h): ${domElement.clientWidth}/${domElement.clientHeight}`) console.log(`offset(w/h): ${domElement.offsetWidth}/${domElement.offsetHeight}`) console.log(`event: ${event}`) } } } )
and i got this errors:
[Vue warn]: Error in directive resize inserted hook: "TypeError: Cannot set property 'detach' of undefined"
and
Cannot set property 'detach' of undefined at ResizeSensor
Apparently the this argument is not correctly bound here:
/** * Class for dimension change detection. * * @param {Element|Element[]|Elements|jQuery} element * @param {Function} callback * * @constructor */ var ResizeSensor = function ResizeSensor(element, callback) { //... this.detach = function (ev) { ResizeSensor.detach(element, ev); }; };
The text was updated successfully, but these errors were encountered:
2cb96f6
No branches or pull requests
Hi,
i got some trouble using this package.
I use this code snippet:
and i got this errors:
and
Apparently the this argument is not correctly bound here:
The text was updated successfully, but these errors were encountered: